File uploads

If your form contains file input fields, you need to ensure the following:

  1. You have enabled a file upload plugin
  2. Your HTML form data is encoded as multipart/form-data when submitted

File storage plugins

Postform does not host uploaded files, however, Postform can upload files to your cloud storage by using a file upload plugin:


Your form must have the enctype attribute set to multipart/form-data:

<form action="" method="POST" enctype="multipart/form-data">
  <label for="file">File</label>
  <input type="file" id="file" name="file" />

Multiple files

To let the user choose multiple files, add the multiple attribute to your file input:

<input type="file" name="files" multiple />

File types

To let the user only choose files of a certain type, use the accept attribute to control which file types are allowed. This example lets the user choose any image file.

<input type="file" name="file" accept="image/*" />
Was this page helpful?