File upload
Collects various files from the responder.
Last updated
Was this helpful?
Collects various files from the responder.
Last updated
Was this helpful?
This question type is used in cases where the responder needs to upload documents, such as a pdfs
of contracts, certificates, prescriptions, etc.
If you would like to ask the responder take a picture of an ID card or themselves, you can use the image upload content type. If you would like the responder to sign a document, you can use the signature content type.
If you don't want the responder to be held up by a file upload question, make sure to mark the question as optional.
In order to have the responder upload a file, you need to set up a S3 bucket or GCS bucket to specify where the file will be stored. For detailed instructions on setting up a file integration in Formsort, you can go to this page for s3 and this page for GCS.
You can opt to define a naming pattern for the files that your responders upload by enabling Filename pattern in the question settings.
Here, you can template any relevant variable you would like to be included in the name of the file into the field. For example, if you type {{first_name}}
into the field, the value of the first_name
variable will be used as the filename at upload.
Formsort also offers three custom variables for these types of file upload components, built right into the settings of the component itself: sessionUuid
, randomUuid
, and currentTimeUTC
. These variables are also able be templated into the Filename pattern field to create dynamic filenames.
sessionUuid
: a uuid that is created once, when the form is loaded.
randomUuid
: a uuid that is created at and re-run at each upload instance.
currentTimeUTC
: a timestamp that is created at and re-run at each upload instance.
You can use several of these variables at once, if required, and one pattern we suggest is {{currentTimeUTC}}_{{responder_uuid}}
. This ensures uniqueness via the timestamp, while still tying the file to a particular user via the responder_uuid
System Library variable.
Visit the System Library variables section for details on built-in variables that provide information about the responder's environment and context.
Note that these extensions will be added automatically. You should also set a fallback naming convention in case the variable is not defined by typing it into the Filename pattern fallback field. Values here cannot use templated variables.
You can whitelist MIME (Multipurpose Internet Mail Extension) types by adding them to the Allowed MIME types field. Once a MIME type is whitelisted, the file upload will only accept that specific file type (as well as any other file type whitelisted).
The below is a list MIME types currently supported by the file upload component:
Category
MIME types
Images
image/gif
image/vnd.microsoft.icon
image/png
image/jpeg
image/svg+xml
Video
image/mp4
Document
application/pdf
You should whitelist MIME types, otherwise you may receive uploads of formats that you cannot process; i.e. if you want to allow only document uploads, whitelist the application/pdf MIME type.
Enabling allow multiple uploads lets the respondent upload more than one file as an answer to a question.