Skip to main content
Media OS reads media_capture in config/filament-flex-fields.php. The examples below are entries inside that existing array; merge them into your published configuration rather than replacing unrelated settings. After configuring your workflow, run php artisan fff:media:doctor for storage and recovery settings, or add --queued for native background image conversions. The diagnostics guide explains the profiles and distinguishes configuration checks from worker and storage verification.

Default storage

Global limits use bytes. FLEX maxSize(), minSize() and maxTotalSizeKb() use KiB. A per-operation MediaPolicy overrides the engine’s global policy; an upload field still enforces its own restrictions independently.

Public image storage

For Laravel’s local public disk, create the normal public storage link:

S3 and other Laravel disks

Configure the disk in Laravel first. Then select it by name:
Credentials, bucket permissions, temporary URLs and browser CORS are configured on the Laravel disk/storage provider. A disk name alone does not provision those services. Source and conversion files can use separate disks.

Tenant storage

Tenant defaults are opt-in. Explicit operation/field disks take precedence; Spatie collection disks also participate in its disk selection. Use a trusted tenant resolver and record authorization in your application. A directory prefix alone does not enforce tenant access. For field-level tenant directories:
scopedDirectory() resolves the directory using the field’s storage context. For a custom business partition, use directory(fn ($record) => ...) with trusted record values.

Resolve storage for each tenant

For application-specific tenant selection, register trusted server callbacks:
CurrentTenantMedia is your application service. Return configured disk names and safe relative prefixes. These compatibility hooks feed the same destination service; workers need the same tenant bootstrap. Explicit disks still take precedence.

Antivirus requirements

Register your scanner before requiring scans. Required scanning rejects files when no scanner is configured or the scanner cannot certify them. Both boundaries must remain enabled when require_virus_scan is true. Scanner example. Quarantine is a private disk for rejected persisted content. Files rejected before a write do not have a stored object to quarantine. Quarantine contents need their own access and retention policy.

URL settings

Capture/field URL helpers use these settings where applicable. An explicit os()->url(..., $expiresAt) uses the supplied expiry. Signing helper expiry is bounded to 1–10,080 minutes.

Custom signed URLs

Register a resolver in your service provider when your private delivery service needs custom signing. This callback returns a URL or null:
PrivateMediaDelivery is your application’s service. The callback is a compatibility configuration hook; new custom adapters can implement their own url() method. Return no URL on signing failure rather than exposing private files publicly. Use the configured helper for a relative stored path:
Authorize access in your application before requesting that link.

Temporary staging

Pending files expire after the configured TTL. Successful promotion receipts are retained separately for retries. Use private shared storage and a cache with atomic locks when web requests and workers run on different hosts. Set the lock duration above your longest permitted storage operation. You can construct validated settings with StageOptions; the staging service uses the configuration-derived settings by default:
Use these values in media_capture.staging for the standard service. See temporary upload usage.

Upload receipts and recovery

Staging and automatic retry recovery are separate switches. Fields can override either switch. Recovery resumes recognized storage operations; it does not restore an entire unsaved form after the browser closes. Keep private receipts, media backups and the application encryption key together.

Native image limits

Byte limits and pixel limits are independent. Image encoding must also fit PHP’s available memory. Use ImageLimits for a per-operation override.

Conversion worker

Use a durable queue connection. Native background conversions reject sync, null, deferred and background connections. Configure queue retry_after or the provider visibility timeout above the job timeout. Web and workers need the same source/conversion disks, private journal disk, encryption key and lock store. Initialize your tenant access context in workers when required by your policies. Spatie conversions use config/media-library.php and native Spatie workers instead. Spatie queue configuration.

Scheduled cleanup

In v4, the package registers these tasks with Laravel’s scheduler by default, independently of whether a media field is rendered: To disable automatic registration of the staging and conversion-journal tasks, merge these entries into the existing media_capture array in config/filament-flex-fields.php:
Keep your other media_capture, staging, images and queue settings. These switches disable only the package’s automatic schedule registration. They do not disable media features or remove the commands; you can still run them manually or register your own schedule. Capture-media retention has its own independent switch:
This maps to filament-flex-fields.media_capture.retention.schedule_enabled; it does not disable either staging or conversion-journal cleanup. In v3.1.19, only the capture-retention task exists; the other two tasks are v4 additions. If your application caches configuration, rebuild it after changing these settings:
If you use the relevant media workflows, arrange the required cleanup yourself when disabling the package schedules. For manual execution:
The normal Laravel scheduler must run for the hourly staging cleanup and daily cancelled-conversion-journal cleanup. Cancelled journals are removed only after their owned files are absent. Active, failed and awaiting-save conversion plans are retained for recovery.

Retention

Retention is deliberate age-based deletion, separate from abandoned staging cleanup. Use dedicated directories; age-based disk retention does not check whether a model still references a path. Retention usage.

Environment variables

Transcription environment options are described in capture services. Configuration caching follows Laravel’s normal deployment workflow.
Last modified on October 24, 2026