(Please note that older articles might not render correctly in mobile view.)
- Default Attachment Naming
- Create a Custom Filename Prefix
Attachments such as images, signatures, and audio files captured through ProntoForms can be downloaded or sent to data destinations. They can then be opened as individual files, separate from the rest of your submitted form data. ProntoForms names these files with the question's unique ID in order to identify where they are from.
ProntoForms also allows you to configure a custom filename prefix to allow you to identify attachments without opening them. This article discusses both the default naming schemes, and how to set up a custom filename prefix for your attachments.
Attachments are named based on the attachment question's unique ID. The label is followed by a number. The number increments if there are multiple attachment answers to the question. Attachment filenames are displayed as:
[unique ID]_#.[file extension]
[unique ID]([Row Number])_#.[file extension]
In the case of nested repeatable sections, ProntoForms adds another bracketed number to indicate what row of the parent repeatable section the attachment comes from.
[unique ID]([Parent Row Number])([Child Row Number])_#.[file extension]
This default naming scheme applies to the majority of file naming at the destination level. This includes documents contained with the "attachments.zip" sent via the API, or downloaded from the web portal.
Configuring a custom filename prefix will override this default naming scheme.
This default file attachment naming only applies when the relevant attachment files are sent separately from the submitted form. This setting is found under File Configuration on the Data Destination:
[Data Record Document Filename Expression]_[unique ID]_#
Or, for Repeatable Sections:
[Data Record Document Filename Expression]_[unique ID]([Row Number])_#
For example, this image filename uses the default naming scheme:
Therefore, the filename is:
A custom filename prefix for your attachment filenames allows you to identify the contents of the file without looking at the file itself. For example, DREL can reference previous question answers using the %a[unique ID] format to create a descriptive name for the file. This will override the Data Record Document Filename Expression, so attachment filenames will be displayed as:
[Custom Prefix Expression]_[unique ID]_#
Note: The custom filename prefix is limited to 140 characters. When using an answer from a form that allows long answers in an attachment name, any answer exceeding 140 characters will be cut off.
To create a custom filename prefix, follow these instructions:
- Ensure you are in the correct FormSpace and select the appropriate form from your list of forms.
- Select Edit Form.
- On the Pages and Questions tab, create or edit one of the following question types:
Note: When creating a custom filename prefix that will be sent to a cloud destination such as Google Drive or Dropbox, be sure to add a reference that will make each filename unique. Using the reference number will ensure each attachment filename will be unique, and prevent overwriting of older files with the same name.