Pro

File Uploads

Accept file attachments with your form submissions

Static Forms allows users to upload files (documents, images, etc.) along with their form submissions. Uploaded files are automatically attached to the notification email you receive and are persistently stored in private secure storage — downloadable from your Inbox at any time. File uploads are available on paid plans (Pro or Agency, including trials).

Paid Feature

File uploads require a paid plan (Pro or Agency). View pricing to enable this feature.

Suggested File Types (Client-Side)

The server does not enforce file type validation. Use the accept attribute and client-side checks to guide users. Common choices include:

Documents

  • PDF (.pdf)
  • Microsoft Word (.doc, .docx)
  • Text files (.txt)
  • Rich Text Format (.rtf)

Images

  • JPEG (.jpg, .jpeg)
  • PNG (.png)
  • GIF (.gif)
  • WebP (.webp)

File Size Limits

File uploads are subject to size restrictions:

  • Maximum file size: 4.5MB per file
  • Multiple files: Each file must be under 4.5MB
  • Total limit: No specific total limit, but each file must be under 4.5MB

File Size

Files larger than 4.5MB will be rejected with an error message. Consider compressing large images or splitting large documents before uploading.

Implementation

To enable file uploads, you must add the enctype attribute to your form:

HTML

Complete Example

Here's a complete form example with file upload:

HTML

Multiple File Uploads

You can allow users to upload multiple files by adding the multiple attribute:

HTML

Multiple Files

When using multiple, each file must still be under 4.5MB. All files will be attached to the notification email.

File Input Attributes

Useful attributes for file input fields:

AttributeDescriptionExample
acceptRestricts file typesaccept=".pdf,.doc,.docx"
multipleAllows multiple filesmultiple
requiredMakes file upload requiredrequired
nameField name in submissionname="document"

AJAX File Uploads

When submitting files via AJAX, use FormData:

HTML

Important

When using FormData with fetch, do not set the Content-Type header. The browser will automatically set it to multipart/form-data with the correct boundary.

React Example

File uploads in React:

TypeScript

Error Handling

Common file upload errors and how to handle them:

File Too Large

Error: File "document.pdf" is too large (6.2MB). Maximum allowed size is 4.5MB.

Solution: Compress the file or split it into smaller parts. For images, use image compression tools.

Client-Side File Type Check

Error: Your own client-side validation message

Solution: Use the accept attribute and JavaScript validation to restrict file types on the client side.

Missing enctype

Error: Files not being uploaded

Solution: Add enctype="multipart/form-data" to your form element.

Paid Plan Required

Error: File uploads are only available on paid plans. Please upgrade to Pro to enable file attachments.

Solution: Upgrade to a paid plan (Pro or Agency) to enable file uploads. View pricing

Best Practices

Always Use enctype

Never forget to add enctype="multipart/form-data" to forms with file uploads. Without it, files won't be sent.

Restrict File Types

Use the accept attribute to guide users and prevent invalid file types from being selected.

Show File Size Limit

Display the 4.5MB limit to users so they know what to expect. Consider client-side validation to check file size before submission.

Validate on Client Side

Add JavaScript validation to check file size and type before submission for better user experience.

Client-Side File Validation

Add client-side validation to improve user experience:

HTML

Persistent File Storage

On Pro and Agency plans (including trials), every uploaded file is stored privately in encrypted secure storage after being attached to your notification email. You can download it from your Inbox at any time — no need to search your email archive.

Pro

  • 2 GB persistent storage
  • Files downloadable from Inbox
  • Private, encrypted cloud storage
  • Short-lived presigned download links

Agency

  • 10 GB persistent storage (5× Pro)
  • Files downloadable from Inbox
  • Private, encrypted cloud storage
  • Short-lived presigned download links

Free tier

Free accounts receive uploaded files via email only. Files are not stored for later download.

Downloading Files from Inbox

To download an uploaded file from a past submission:

  1. Open Inbox from the sidebar
  2. Click the submission row to open its detail view
  3. Find the Attachments section in the detail view
  4. Click Download next to the file name

Presigned URLs

Each download click fetches a fresh 5-minute presigned URL. You must be signed in to your StaticForms account. The link is not shareable — it is generated on demand just for you.

Storage Quota & Auto-Eviction

When a new upload would exceed your storage quota, StaticForms automatically evicts the oldest stored files to make room. This keeps your account within quota without blocking new submissions.

  • Eviction removes the oldest files first (least-recently-uploaded)
  • Evicted files show as "no longer available" in Inbox — your original notification email still contains the attachment
  • You receive a one-time email warning at 80% quota usage
  • Storage usage is visible in Workspace → Plan & Usage

Prevent eviction

Monitor storage usage in Workspace → Plan & Usage. Delete old submissions you no longer need, or upgrade from Pro (2 GB) to Agency (10 GB) for more headroom.