File fields
type:file renders a file input. The uploaded file is stored in storage/crudadmin/uploads/{table}/{field} (published as public/uploads) and the column holds only the filename.

- The filename is slugged from the original name,
My Contract.PDFis stored asmy-contract.pdf. When the file already exists, a number is appended (my-contract-1.pdf), files are never overwritten. - Uploading a new file replaces the previous one and deletes it from the storage. Removing the file in the form clears the column and deletes the file.
- Deleting the record deletes its files.
- The default size limit is
max:10240(kilobytes). Useextensionsto restrict the file types. requiredis checked only when no file is stored yet, so an existing record can be saved without uploading the file again.- Very large images are downscaled to the maximum image size (3840×2160 by default). Uploaded files are not cropped.
Images
image is a shortcut for type:file|image|max:5120. Non-image files are rejected and the size is limited to 5 MB. A max written on the field wins.
Multiple files
multiple stores several files in one field as a JSON array. The model returns a collection of files.
- In the form, stored files can be reordered and removed, new files are appended. Removed files are deleted from the storage.
maxandextensionsare checked for every uploaded file.requiredneeds at least one stored or uploaded file.
One record per file
multirows lets the user upload several files in the create form and creates a separate record for each file. Other values from the form are copied into each record. When editing, the field holds a single file.
Changing the filename
Defineset{Key}Filename($filename) on the model to change the name of an uploaded file. The method receives the slugged filename with its extension, the collision number is added afterwards.
app/Models/Order.php
Private files
private stores the file in storage/crudadmin/uploads_private, which is not published in the public directory. Serve the file through the signed download() link.
$privateUploads. Image compression, deleting old files and uploading from code are described in Model uploads.
Image size in API responses
resize sets the default image size in admin API responses. The file URL returned by the API points to the resized image.
resize:600,400 crops to exactly 600×400, resize:600 keeps the ratio by width, resize:null,400 by height. A multiple field returns the list of resized URLs.
Uploader
type:uploader renders an asynchronous uploader. The field has no database column. Files uploaded before the record exists are stored in
{table}/{field}/temp/{uuid} and moved to {table}/{field}/{id} after the record is created.