Enable the catalog
The feature is disabled by default. Publish its optional migration explicitly:config/media-studio.php.
Application Files lists registered media only. A raw disk source is a separate,
explicit opt-in for libraries that intentionally list standalone objects:
revision. Change this value when you
change its ownership or access scope. Old projections then stop being served until
you index that source again. Disk, prefix and storage-location changes also change
the source fingerprint automatically.
Permissions
Run the normal permission installer with your application’s authentication guard:
Viewing an image necessarily sends its bytes to the browser. Hiding download
actions cannot prevent saving an image that someone is authorized to view.
An optional
authorize callback can restrict a source further. It receives the
server-resolved tenant and the authenticated Principal and must return true.
Callbacks must be stateless and work in CLI if you index using the provided command.
Index application folders
Raw disk sources withoutallow_unregistered => true are hidden, including
previously indexed rows and their content URLs. Use a model source for folders
that mix originals and conversions.
Register explicit existing paths. Studio stores references; it does not copy files
or scan an entire bucket during browsing:
media-studio.principals. The actor needs
the department, source and indexing permissions. One call accepts up to 120 paths.
An inventory producer can submit successive bounded batches. Relative folders such
as team are preserved. Paths outside the configured prefix are rejected.
Application code can use the same service after the owning application commits its
upload or replacement:
forgetDisk() never deletes the underlying object. Call it only from trusted
application code after your own reference/ownership rules have permitted deletion.
This integration does not assume that a FileUpload field automatically deletes
persisted files. Register lifecycle hooks in the application or plugin that actually
owns those files.