Skip to main content
Flex Forms deliberately splits uploads across two disks with opposite visibility defaults, because they serve opposite purposes.
1

Keep defaults for a single Laravel disk setup

If your app already has public and local disks configured (the Laravel default), no changes are needed.
2

Point either disk at S3 (or any Flysystem disk)

Set FLEX_FORMS_DESIGN_DISK and/or FLEX_FORMS_SUBMISSIONS_DISK to any disk name defined in config/filesystems.php — S3, DigitalOcean Spaces, or your own driver.
3

Tune signed URL lifetime

FLEX_FORMS_SIGNED_URL_TTL (minutes, default 15) controls how long a link to a private submission file stays valid before it needs to be re-signed.
4

Set a per-form quota

FLEX_FORMS_QUOTA_BYTES_PER_FORM (default 500 MB) caps total storage per form across all submissions — uploads beyond the quota are rejected.
5

Lock down multi-tenant access

Set uploads.authorize to a callback and FLEX_FORMS_REQUIRE_AUTHORIZE=true so a panel user can only view/upload files for forms they actually own — full recipe: Multi-tenancy · Config & env.

Orphan cleanup

Interrupted uploads (a failed atomic commit, an abandoned multi-page fill) can leave unreferenced blobs behind. A scheduled command prunes them automatically based on age:
Runs hourly via the scheduler — no manual setup needed
Do not point submissions_disk at a publicly readable bucket/ACL — respondent uploads (IDs, contracts, photos) are only meant to be reachable through the package’s signed-URL controller, which enforces the TTL and, when configured, your uploads.authorize callback.

Image variants

Uploaded images are optimized automatically (never upscaled). Non-image field uploads stay as a single original file. Default WebP quality is 80 (FLEX_FORMS_WEBP_QUALITY). Schema keys such as cover_path / cover_url always point at the normal file; thumbs are derived beside it.

Optional Spatie Media Library

Flex Forms stores files on disk by default. If your app already uses spatie/laravel-medialibrary, you can make Spatie the primary media driver:
.env
When FLEX_FORMS_MEDIA_DRIVER=spatie and Media Library is installed:
  • Design assets and respondent uploads are stored as Spatie media (schema paths use ffmedia:{uuid} tokens; URLs come from Spatie conversions).
  • Images get native Spatie conversions (normal / thumb) with Fit::Max (never upscale), WebP quality from config, then the original is deleted.
  • Cover + field normal conversions can generate responsive image srcsets (FLEX_FORMS_SPATIE_RESPONSIVE, default on).
  • Social / OG images are cropped to 16:9 without upscale before attach (JPEG for crawlers).
  • Non-image field uploads stay a single original (no conversions).
  • Form delete / purpose clear purge Spatie media collections.
If Media Library is missing or the driver is disk, Flex Forms keeps the built-in disk pipeline — no Global Settings UI is required.
Yes, as long as visibility is handled correctly — Flex Forms writes design assets as public and submissions as private regardless of whether they share a physical disk, but using two disks makes bucket-level policies simpler to reason about.
Logo fits in 500×500, cover normal ≤1500px (thumb ≤400px), social/OG ≤1500px at 16:9 JPEG, and respondent images ≤1500px (thumb ≤350px). Smaller images are never upscaled.
Last modified on September 7, 2026