Available on: Personal, Professional, Business plans
Formspree allows you to upload files to your form natively. File upload allows you to collect information that may not otherwise be expressed well in text-based HTML input fields.
For example, you may be using Formspree as a way for users to submit support tickets using Form Routing Rules to send a form to the right team. Users might find it easier to explain their problem with a screenshot, a perfect use for file uploads.
All HTML forms have a default attribute called enctype that we need to override. In the form declaration, we need to set
Now we can add the file input field. There's a number of options we can add to this field to customize it with how we want. For example, if we only want to accept PNG and JPEG images, we can add
An example form using file uploads is below:
<form method="POST" action="https://formspree.io/FORM_ID" enctype="multipart/form-data">
<input type="email" name="email" placeholder="Your email">
<textarea name="message" placeholder="Details of your problem"></textarea>
<input type="file" name="attachment" accept="image/png, image/jpeg">
<button type="submit">Send Test</button>
Accessing Your Files
Files are included on the Formspree dashboard. On the submissions page of your form, you can download each file.
Each Formspree account has an account quota based on the plan you have. You can view the storage each form is taking up on your forms dashboard. If you start approaching the quota, we will send an email warning. Files uploaded that cause you to go over the limit will result in us deleting files, starting with the oldest first.
Each submission is allowed to submit up to 10 files, with each file upload limited to 25 MB. In addition, we limit the total request size to 100 MB. The total request size includes request headers and the total size of the request body. All requests must complete within 30 seconds otherwise you will receive a timeout error. Depending on your users' Internet speed, this may limit the total size of files you can upload.
If you have disabled submission storage, we do not store files.
Some legacy Formspree Gold and Platinum users don't have access to file uploads. You can update your plan on our plans page to gain access to file uploads and a number of other features. You can find out if you're in a legacy plan if there's a note at the top of the page saying "You're in a legacy plan".