FileUpload
StudioFileUpload extends Filament’s native FileUpload. The regular file input
publishes into Studio when the form saves. The optional Media Studio action uses
the same MIME allowlist to pick an existing file without uploading a second copy.
Configure the workspace and destination using trusted record or panel context.
With no upload folder, uploads go to the configured scope root or to the workspace root if unscoped.
acceptedMimeTypes: null for the workspace’s usual upload policy, or
list the exact types accepted by this field. The upload destination applies to
new files. Existing selections may come from any readable folder in the configured
workspace unless you restrict them with studioScopedFolder(). Uploads use that workspace’s storage and configured
conversion pipeline. Set generateRenditions: false to skip automatic
renditions for this field. Filament’s normal temporary-upload limits still apply.
Store the resulting string in your model. It holds an asset ID and a pinned
version ID. Use StudioFileUpload::parseReference($value) to recover both IDs.
With Filament’s multiple(), persist an array and explicitly set
maxFiles(). When removing a file from the form, save the changed references
in your model. Studio files can be shared by other records, so this field does
not delete them.