Skip to Content
Concepts

Files

A File is a file a Visitor attached to a Submission. Files are stored privately, limited in size and count, and served only as downloads to people with access.

A File is a file a Visitor attached to a Submission. Files are stored apart from the Submission's fields, in a private store in the Workspace's Region. The Submission keeps the field name, the file name, the content type and the size of each File.

Limits

  • A Submission carries up to 10 Files.
  • Each File can be as large as the Workspace's upload limit, 10 MB by default. See Workspaces and Regions.
  • A plain HTML form that sends Files can carry about 4 MB in total, because the request is capped at 4 MB. The drop-in script has no such cap: it sends each File straight to storage before it sends the form.

See File uploads for how to build a form that sends Files, and Limits for the full list.

Who can open a File

A File is never public. These people can download it:

  • Owners and Developers of the Workspace, and Maintainers with access to the Site, once they are signed in. The app serves the File at https://app.insaneforms.com/api/files/<file-id>.
  • Studio readers of a Studio connection that covers the Site. Sanity Studio gets a download link when someone selects a File. The link works for 60 seconds, for that one File, and access is checked again when it is opened. See Sanity Studio.

Files are served as downloads and never as previews. The app answers with an attachment header and a no-sniff header, so a browser saves the File instead of running it.

Emails and webhooks carry links to Files, never the Files themselves. The link in an email or a webhook needs a signed-in person with access. See Email notifications and Webhooks.

Files are not scanned for viruses. Treat a downloaded File like any file from an unknown sender.

How long Files are kept

A File lives as long as its Submission. "Delete permanently" in Trash removes the Submission's Files at once. When the 30-day cleanup deletes a Submission, the daily cleanup removes the stored copy afterwards.

A File that was uploaded but never attached to a Submission is removed by the daily cleanup once it is more than 24 hours old. The cleanup checks storage in batches and resumes where it stopped, so removal can take more than one run.

On this page