File-Type Upload Control 


In this Article
Related Articles

Introduction

If you are asking your users to upload a file to your form, it is now possible to control what types of files can be accepted. For example, if you only wanted to accept image files for a particular upload field, you now have that option.

This can be helpful in preventing users from uploading the wrong types of files, thus saving you the trouble of having to ask your users to resubmit files they incorrectly uploaded.


Set Up

Once you are inside the form builder, you will need to Add an Upload Field, click on Options and then select Validation Rules.

From here, there are three "quick" options for you to choose from: images, documents and archive files. These represent the most common types of files, however you can also define custom file extensions if needed.


Images Quick Option

The Images Option covers the following image types:

  • .bmp (Bitmap)
  • .jpg (JPEG)
  • .gif (Graphics Interchange Format)
  • .png (Portable Network Graphic)
  • .tif (Tagged Image Format)
  • .qtf (QuickTime Format)

Office Files Quick Option

The Documents Option covers the following file types:

  • .doc (Older Microsoft Word format)
  • .docx (Current Microsoft Word format)
  • .xls (Older Microsoft Excel format)
  • .xlsx (Current Microsoft Excel format)
  • .ppt (Older Microsoft Powerpoint format)
  • .pptx (Current Microsoft Powerpoint format)
  • .pdf (Adobe PDF)
  • .odt (Open Office word processor document)
  • .ods (Open Office spreadsheet document)
  • .odp (Open Office presentation document)
  • .pages (Apple Productivity Pages document)
  • .keynote (Apple Productivity Keynote document)
  • .numbers (Apple Productivity Numbers document)

Archive Files Quick Option

The Archive Files Option encompasses the following file types:

  • .zip (ZIP archive)
  • .rar (RAR archive)
  • .7z (7-Zip archive)
  • .dmg (Apple Disk Image archive)
  • .tar (Tape Archive)
  • .gz (GZIP archive)
  • And many other archive formats

Applying Your Configuration

Once you have checked the file type(s) that you would like to allow for, all you need to do is save your form and the configuration will live.


Custom File Extensions

If you are expecting users to upload file types that are not included in the above options, you can click the Custom File Extension checkbox in order to allow for other options.

Once you check the Custom File Extension box, a blank text field will appear:

You can enter into the text field the extension of the file you are expecting. You do not need to include the period before the extension. You may enter multiple extensions by separating them with commas. When doing so, do not put in spaces.

Here is an example using common extensions: doc,docx,pdf,png,zip

Once you have entered in your custom values, press Enter and your changes will be saved.


Upload Processing

When a respondent submits a response with a file upload, the FormAssembly server will check that the file's extension corresponds with the list of extensions you have specified. If there is a mismatch, the server will return an error to the user.

If the file extension is in the list of allowed extensions, the server will go on to check the internal type (known as the MIME type) of the file. This acts as in integrity check to ensure the internal type of the file corresponds to what the file extension says it is. If there is a mismatch between these two, the file is still let through, but the mismatch is logged by the server. If there is a match between the two, then the file is fine and is let through without incident.

Terms of Service · Privacy Policy