false to disable it. Most FLEX presentation/storage switches also accept evaluated closures where their signature permits them.
Presets and validation
Validation examples.
Layout and presentation
Common inherited FLEX appearance APIs include
size() and focusOutline(); see shared concepts for field configuration. Reorder uses inherited reorderable() with the FLEX drag presentation.
Typed layout example:
Sources
Source examples.
Storage and cleanup
Storage examples.
Media OS
Events and lifecycle examples.
Disk image processing
Image examples. Spatie uses model conversions instead of these native conversion APIs.
Default avatar
Avatar examples.
Information editor
For application reads:
readFileEditorialMetadata($fileKey), getFileEditorialText($fileKey, $field, $locale) and resolveFileEditorialText($metadata, $field, $locale). Metadata examples.
Staging and custom saves
Save/recovery examples.
Inherited Filament options
The field extends Filament FileUpload and retains its normal form/validation APIs. Common choices include:
Replacing inherited low-level storage callbacks such as
saveUploadedFileUsing() means your callback owns persistence and may bypass the Media OS lifecycle. Prefer mediaWriteUsing(), processors and finalizers when retaining Media OS behavior. Native FilePond panel/button-position options chiefly apply to its avatar/editor UI; FLEX lists/grids own their presentation layout.
Optional Spatie field
The wrapper retains native collection options:collection, conversion, conversionsDisk, responsiveImages, customProperties, mediaName, manipulations, properties, customHeaders, filterMediaUsing. It also offers spatieOptionsUsing() for typed native adder options. Full Spatie examples.
Data-driven schemas
For schema-builder fields, put supported options insideconfig:
disk, directory, visibility, multiple, max_size_kb (or max_size), accepted_types, min_files, max_files, max_total_size_kb, documents_only, images_only, variant, size, instant_upload, upload_layout, compact_header, grid_columns, avatar_size, store_metadata_in, scoped_directory, optimize_images, max_image_width, max_image_height, allow_url_upload, allow_webcam_upload, queue_image_conversions, image_conversion_queue.
Queued optimization configuration:
Click an uploaded file
Configure eitherfileClickAction(?Closure $callback) or fileClickUrl(?Closure $callback); the last configured handler replaces the other. Pass null to clear it. These are trusted PHP callbacks, not executable JSON options.
file (a TemporaryUploadedFile or the saved disk path/Spatie UUID), fileKey (the current native field-state key), fileName, mimeType, component, livewire and record. The browser sends only the file key. PHP resolves the current field state and authorizes saved-file access through the appropriate Media OS bridge. The bridge does not generate preview URLs, conversion jobs or unnecessary download URLs for this click. For disk files, read activation always requires a native original record path or an explicitly configured preventFilePathTampering(..., allowFilePathUsing: ...) policy; withRecommendedDefaults() supplies the existing create-form directory policy. Disabling general path tampering protection does not bypass this click guard. Temporary uploads must still exist. A stale or foreign key rejects before invoking the callback.
Filament\Notifications\Notification in the example above. A callback may perform your application action, mount an application-owned Livewire action, or return a Laravel redirect response. fileClickUrl() returns a same-window application-relative or HTTP(S) URL, or null for no navigation. Active schemes, protocol-relative URLs, credentials, whitespace and URLs over 2,048 bytes are rejected. A temporary fileKey is not a durable database record ID: your application route must resolve it through an authorized owner/session mapping, or use record and the stored file to build a route for a persisted record. Never treat a URL or callback as authorization to another record. Business policies, transactions and server-side idempotency of write callbacks belong to your application.
Compact header and maximum files
compactHeader() removes file-header illustrations and puts the description and Select files control in a short row; narrow containers stack them. It works with both list and grid and does not change tile size or file-row density. URL/camera source controls retain their source-specific presentation. compactList() remains a separate option for smaller file rows. JSON configuration supports compact_header: true.
For multiple uploads, maxFiles(5) disables Select files and further browsing/drop additions once five active rows occupy the slots. Queued, uploading and failed files reserve slots until removed. Removing a row enables adding again. Native FilePond admission and server validation remain authoritative if client state is forged or several files are chosen at once. A single-file field retains replacement behavior; the limit lock applies to multiple fields.
Grid sizes and actions
gridSize('md') uses the current 116px tile; gridSize('sm') uses 96px (about 17% smaller). gridTileSize(100) remains the exact-pixel option (80–320px). The last size call wins. All tile artwork, progress, corners and primary controls scale from the same tile geometry.
The default gridActions('menu') uses an ellipsis action menu only when the current file has actions beyond removal. A removal-only file keeps its × button. The menu follows the HeroUI Usage presentation, with 150 ms entry and 100 ms exit, and supports arrows, Home/End, typeahead and Escape. Reduced-motion preferences skip the animation. The menu includes configured preview, metadata, image editing and open/download actions, plus pause/resume, retry or manual upload when relevant. Reorder files by dragging their tiles; movement commands are not included in the menu. No hover toolbar is painted below the image. gridActions('inside') is a compatibility alias for menu; gridActions('below') explicitly opts into a separate secondary row. Queue pause/resume lives in the footer below the files, beside the optional summary, and does not shift the grid. Image upload percentages use a high-contrast dark badge with white text; document tiles retain the blue percentage.
fileClickPreview() enables the existing image viewer and makes a completed image tile (or list content) open it. Non-image files cannot invoke an image preview. It is mutually exclusive with fileClickAction() and fileClickUrl(); the last click configuration wins. Its boolean/closure condition controls that instance. fileViewer(false) independently disables preview. These options do not replace file ownership checks.
Choose the viewer image source
previewConversion('thumb') selects the small list/grid/avatar preview. fileViewerConversion('large') independently chooses a stored named image conversion for the lightbox. The default fileViewerConversion(null) uses the original. Missing/unfinished conversions fall back to the authorized original. This supports native disk manifests and generated Spatie conversions. Newly selected temporary images still show their temporary original until storage/conversions exist.
fileViewerUrlUsing(?Closure) can resolve an existing large preview from your legacy system. Its arguments are file (saved path/Spatie UUID), defaultUrl, record and component. Original authorization runs first. A null callback result retains the normal original/conversion URL. URL validation matches previewUrlUsing(). This affects only the lightbox; editor, Open and Download retain the original. Legacy files and galleries.