Attachment File Naming

 

About

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 label 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.

Default Naming Scheme

Attachments are named based on the attachment question's question label. The label is followed by a number. The number increments if there are multiple attachment answers to the question. Attachment filenames are displayed as:

[question label]_#.[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.

 

Separate File Attachments with a Document

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:

The default naming of attachments is controlled by both the control's Question Label and the linked document's designated Data Record Document Filename Expression. Attachment filenames are displayed as:

[Data Record Document Filename Expression]_[Question Label]_#

For example, this image filename uses the default naming scheme:

Therefore, the filename is:

20160406-1837674070_Photos 8_1.jpg

[ top ]

 

How to Create a Custom Filename Prefix

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[questionLabel] 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]_[Question Label]_#

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.

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 (%r[id]) will ensure each attachment filename will be unique, and prevent overwriting of older files with the same name.

To create a custom filename prefix, follow these instructions:

  1. Ensure you are in the correct FormSpace and select the appropriate form from your list of forms.
  2. Select Edit Form.
  3. On the Pages and Questions tab, create or edit one of the following question types:
    • File
    • Image
    • Audio
    • Signature
  4. While editing the question, add your DREL string under the Properties tab, in the Custom Filename Prefix section:
  5. Save and Deploy the form.

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.

[ top ]

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments