HomeGuidesRecipesAPI
HomeGuidesAPILog In

File Selection

The File Selection question type allows users to upload files to the form and the Content Library. This question can be used to gather existing files for people in other workflow steps to view, insert the uploaded files in the document output or other actions or add the files to the content library for future use.

πŸ“˜

Document Preparation

Standard or selection placeholders can be used throughout the document to specify where the content items are to be inserted.

Usage

  1. Drag and drop a File Selection question onto a page, section column or tab and set the question’s properties as below:
PropertyDescription / Examples
MandatoryWhether the field is mandatory.
MultipleEnables uploading multiple attachments at a time, by selecting the files or using drag and drop.
When uploading, the multi-file upload dialog is presented as a modal, and each file shows name, status and progress information, as well as the option to remove.
ViewableEnables supported file types to be viewed without download. Default is on.
Content TypeSelect the type of content that will be uploaded or selected from a drop-down list. Options are listed below:

  • Document Fragment - Only accepts Doc and Docx files

  • Image - Only accepts image files

  • Text - Accepts text, very similar to a text field

  • Attachment - Accepts all file types

  • Audio - Only accepts audio files

Display TypeSelect if the display and functionality of the question. The options will depend on the display type selected:

  • Upload File – Enable uploading of files in Produce.

  • Upload Image – Enable uploading of images in Produce.

  • Camera Front – Opens the front camera on an iOS or Android device, but displays a file selection option on a computer.

  • Camera Back – Opens the back camera on an iOS or Android device, but displays a file selection option on a computer.

  • Search - The content library can be searched for existing items to use

  • Search or Upload - Allows the option of Search or Upload

Image ResolutionChoose a setting from the drop-down menu to indicate the resolution of the images that have been uploaded. The default option is "Actual," which means the image will remain unchanged. The other options are:

  • Small (320Γ—240)

  • Medium (640Γ—480)

  • Large (1632Γ—1224)

  • Actual Size, which is the original size of the image as captured by the camera or uploaded without any alterations.
Adjusting the image resolution enables you to manage the file size effectively, which can be particularly helpful when attaching the image to an email or using it with a third-party software.
OrientationPrompts the user to change the way you take and display the photo when using the camera on mobile devices. This can be Any, Portrait, or Landscape. This property can only be configured if Camera Front or Camera Back Display type has been selected. An animated prompt displays when the device is using the opposite orientation.
Button TextSpecifies the button name for uploading content on web forms. If left blank, the default text will be used. Note: This text will still be used for offline apps except for image and audio file types.
Take Photo or Record Video Button TextSpecifies the button name for uploading images or audio files on the offline apps. If left blank, the default text will be used depending on the upload type.
Attachment NameGives the file an assigned name upon generation. Note: The Attachment Name field accepts question references. This can be used to make your attachments name more descriptive.
Allow Add To Content LibraryAllows the items which are uploaded to be inserted into the content library.
Valid ExtensionsA comma-separated list of valid file type extensions. For example, if you enter .pdf, .jpg, .docx, then only PDFs, jpg and Word documents can be uploaded as the attachment. If no value is entered, all file extension types will be allowed. Visible if 'Upload' is selected. Note: The "Valid Extensions" field accepts a comma-separated list of values that define what type of documents can be uploaded to Produce. For example, if you enter: .pdf, .doc, .docx, then only PDFs and Word documents can be uploaded as the attachment.
Max FilesSpecifies the maximum number of files that can be attached. Note: Default is 0, or no limit set.
File Size Limit (MB)Maximum upload size in whole numbers of MB. The smallest upload limit is 1MB. Note: This is applied to each individual file when the Multiple Attachments option is enabled. Also, the default is 0, or no limit set.
Content FolderIf Allow Add To Content Library is selected, a content library folder will need to be selected to insert the file into.
Restrict By FolderSpecify a folder in the content library to search.
Allow EditAllows users to edit existing text files inside the content library. Visible if Content Type Text, Display Type Search or Upload and Search is selected.
  1. In the "Attachment Name" field, enter the relevant file name for the attachment when generated.

πŸ“˜

Note

The Attachment Name field accepts question references. This can be used to make your attachments name more descriptive.

  1. (Optional) Select the answer type where Data as Base64 and File Name as text are available for file uploads, while Edited or Original Image are also available for image uploads.

πŸ“˜

Multiple Attachments

If Multiple attachments has been enabled, the answer types changes to [File Count] and [File Name].

  1. Save your project.

Viewing Uploaded Files

SmartIQ includes an embedded content viewing capability on File Selection and Content Library question types, which allows the user to view supported file types inline without having to download the content.

πŸ“˜

Viewable file types

Supported document types are PDF and supported image types include JPG, GIF, PNG and BMP.

Within Produce, a supported file type will display an eye icon next to the uploaded item or content library question.

Clicking on the view icon will open the viewer for that file. Below is a PDF example:

Referencing Uploaded File Contents

Actions and data sources and potentially other connectors can reference the contents of a file uploaded to a form. To reference the file contents, add the following to the end of a reference to the file upload question:

".hex"
".base64"

For example, if your upload question is q1, the reference will be [q1.hex] or [q1.base64].

To check the name or size of the uploaded document, use the following:

".filename"
".filesize"

πŸ“˜

Note

When there has been no file uploaded to the question, then the result is a blank string.