Jamform | Simple, Serverless, Forms Made Easy

File Uploads

Jamform not only supports normal text and number fields, but also allows you to quickly and easily setup file uploads in your form. In order to do so you just need to specify a few special attributes with your form.

Enctype:

To start accepting files with your form, you first need to set your forms enctype to 'multipart/form-data'. This specifies how to the form data will be encoded, without this attribute your files will not be read.

File Field:

To designate a form field as a file upload you must first set the input type attribute as 'file'. Next, you must set the name attribute as '_file'. The underscore is important as it informs Jamform that this is a special field so it can handle it accordingly.

Example:

Notice the form' enctype attribute as well as the input's name in the example code snippet below.

<form action="https://jamform.com/f/{formId}" enctype="multipart/form-data" method="POST">
  <input type="file" name="_file" />
  <button type="submit">Send</button>
</form>

Multiple Files:

If you want to allow users to upload multiple files from your form you can do so by simply specifying the attribute multiple on your file upload input.

Example:

Notice the field still has the same name and type attributes but this time the multiple attribute is added.

<form action="https://jamform.com/f/{formId}" enctype="multipart/form-data" method="POST">
  <input multiple type="file" name="_file" />
  <button type="submit">Send</button>
</form>

Limitations:

There are a few limitations built into Jamform file uploads. While multiple file uploads are allowed, each submission can only contain up to 5 files. Also, each file can only be up to 25 MB in size. Finally, your account only has a certain amount of storage capacity and once full all new files will be rejected, be sure to check your storage limit and delete files or upgrade your account if necessary.