Creating a form that includes file uploads
There are some limitations in this initial release of the file upload, as a feature. This includes constraints when it comes to file formats, file size, and ability of end users to save progress.
- Allowable file types:
- Documents (pdf, txt, doc, docx)
- Images (jpg, jpeg, png)
- Spreadsheets (xls, xlsx, csv)
- File size limitations:
- 10 MB maximum per file
- 50 files within a repeating set
- Users saving a copy of their answers:
- Saving answers, either when in progress or once submitted, will not include the files uploaded themselves. If a user resumes filling the form later, they will need to re-upload the files uploaded so far.
Add file upload to a form you’re building:
- Create a form.
- Add a form element to your form and select the file upload component.
- Ensure your form also contains a question asking for contact information. (This is important in case there’s an issue with an attached file).
- Test and publish your form.
- Share your form and start receiving responses.
Collect multiple files in one form
Each file upload field accepts one file at a time. Form fillers cannot upload multiple files or folders using a single field.
You can add and customize separate file upload fields for each document you need to collect. Use repeating sets to allow form fillers to upload as many files as they need.
Use repeating sets to collect multiple files
Repeating sets allow form fillers to add more file upload fields as needed.
To collect multiple files using repeating sets:
- Add a Repeating set component to your form.
- In the repeating set, select Add form element to set.
- Choose File upload.
- Add more file upload elements within the repeating set if needed.
Important: A form filler can use a repeating set to add up to 50 individual files.
You can also include other questions within the repeating set, such as a description of each uploaded file.
Retrieving files that were submitted within a form
The same storage conditions apply as for submission data, where GC Forms only temporarily keeps data and files until downloaded and confirmed.
Managing responses of forms with file upload fields
GC Forms allows you to download up to 150 responses or download batches of up to 500 MB at a time with attachments, whichever limit is reached first.
If your form collects several files per response, you may need to download responses in smaller batches.
Tips for managing downloads with multiple files attached
- Identify files using your response data. Attachments are grouped into folders by submission ID.
- If downloading via CSV, you can match filenames to their corresponding questions, then locate the files in the submission’s folder.
- Files appear in the submission folder in the same order as their corresponding file upload fields in your form.
- Use descriptive question names when creating your File upload component. Labels such as “Project budget” or “Financial statement” make it easier to identify which files belong to which questions in your downloaded response data.
For step-by-step download instructions, see Getting form responses.
Files are linked directly within responses accompanied by an attribute that shows whether scanning for malicious files detected any potential harm. It is your responsibility to check the isPotentiallyMalicious attribute before opening the linked files.
Using the API to retrieve files uploaded to a submitted form:
To learn more about integrating with the API, visit our technical documentation site.
- Once set-up, your integrated target system will make an API call to retrieve responses. You will receive each submission as a raw JSON file that includes direct links to files, if attached.
- Note: These direct download links are only valid for 10 seconds for security reasons.
- As files are scanned upon being submitted, they may also be marked as potentially being malicious, based on the file scanning software. You must decide what to do with flagged files — whether to download those files or not if they include a flagged with a “malicious” or “bad” metadata attribute.
- Note: No file scanning software is perfect, take precautions when opening any files.
- Add some code for how to handle the encountering of
isPotentiallyMalicious:true - Access submission data and files attached in your system.
- Before confirming a response, ensure you’ve got access to all attached files. These file download links are only temporarily available, as they are valid for up to 10 seconds. If you have not received all files, redownload the same form submission to get new download links.
- Report a problem if there is one with file or data.
- Once you are confident that you indeed have all submission data and files submitted, confirm that all data has been transferred successfully.
- Responses and files will then be removed from GC Forms, after 30 days.
Example: Response data will look something like this:
{
"createdAt":1749476854628,
"status":"New",
"confirmationCode":"714dfe46-6fa1-4281-8d15-a39bcebc3c4f",
"answers":"{\"1\":\"Test1\",\"2\":\"form_attachments/2025-06-09/8b42aafd-09e9-44ad-9208-d3891a7858df/output.txt\",\"3\":\"form_attachments/2025-06-09/9064b3c7-eee5-4599-99c8-a257b2b5f37d/a0393b10-396c-4b8d-a97c-15394fddda86.jpg\",\"4\":\"form_attachments/2025-06-09/0c7c3414-05e2-4ae6-a825-683857e4c0c4/IMG_0441.jpeg\"}",
"checksum":"cc33cb49f6c088bf98b7315794db216e",
"attachments":[
{
"name":"output.txt",
"directLinkToFile":"https://s3-link...",
"isPotentiallyMalicious":true
"md5":"54b0c58c7ce9f2a8b551351102ee0938"
}
]
}