Skip to main content
The File Upload block provides a powerful drag-and-drop interface for users to submit files. It includes robust security limits, automatic image optimization, and multi-file support, seamlessly routing files directly to your configured storage disks (like AWS S3 or Google Cloud Storage) without stressing your primary web server.

Business Use Cases

Job Applications

Collect resumes and cover letters by enforcing PDF-only uploads.

Field Inspections

Allow field workers to take photos of broken equipment directly via their mobile device’s camera.

KYC Verification

Securely upload copies of passports or driver’s licenses to a private S3 bucket.

Configuration & Usage

1

Deploy to Canvas

Drag the File Upload block from the Component Catalog onto the Canvas.
2

Set Storage Rules

Define which disk and directory the uploaded files should be saved to (e.g., s3 in the customer_resumes folder).
3

Enforce Security Restrictions

To prevent malicious uploads, always set the Accepted Types (e.g., just PDFs) and a strict Max Size (KB) limit.

Technical Configuration Schemas

string
The Laravel storage disk where the files should be saved (e.g., s3, public, local).
string
The specific folder inside the disk where the files will be placed.
string
Sets the ACL visibility on S3-compatible storage (e.g., private or public-read).

How Flex Forms stores respondent files

  • Images are converted to WebP (quality 80 by default) with a normal variant (max 1500px long edge) and a thumb (max 350px). Smaller images are never upscaled; the original upload is discarded after variants exist.
  • Everything else (PDF, Word, video, audio, …) is stored as a single original file — no forced WebP, no thumb.
  • Storage uses your configured submissions disk by default. If you set FLEX_FORMS_MEDIA_DRIVER=spatie and install spatie/laravel-medialibrary, Spatie becomes the primary store: native conversions, responsive images (optional), ffmedia:{uuid} path tokens, and originals deleted after conversions. Details: Upload disks.

Data Payload Architecture

Flex Forms handles the heavy lifting of uploading the file to your cloud storage. When the form submits, it passes the path to the file, not the raw binary data.
Generating URLs: To view these files, you will need to generate a URL based on your disk configuration (e.g., https://my-s3-bucket.s3.amazonaws.com/customer_resumes/john_doe_resume.pdf).

Deep Dive: Image Optimization

When asking for photos (e.g., a profile picture or an inspection photo), modern smartphones often upload 10MB to 20MB raw images. If 1,000 users upload a 15MB photo, you will rapidly burn through your cloud storage and bandwidth budget. By enabling Optimize Images and setting a Max Width/Height (e.g., 1920px), the File Upload block intercepts the massive file on the server, resizes it, and compresses it down to ~500KB before saving it to S3.

Best Practices & FAQs

Always specify a directory (e.g., form_uploads/campaign_x). If you leave it blank, all files dump into the root of your storage disk, making it a nightmare to manage later.
Last modified on September 7, 2026