Upload File Attachments

You can include file uploads as a part of a Zingtree workflow session. Some use cases include:

  • Attaching a screenshot.
  • Including a photo.
  • Uploading a document.

Overview

Using Data Entry Fields, File field type is used to include a file in the session data gathered by Zingtree. When the end-user uploads a file, here’s what happens:

  1. The file is uploaded from the end-user’s computer to a Zingtree storage server.

  2. Zingtree stores the URL in the configured session variable, and this URL can be used to directly access the uploaded file.

Security Note: Each file uploaded is prefixed with the current session ID, so that files with the same name aren’t overwritten between sessions, and the file names cannot easily be discovered.

How It Works

When the end-user reaches a node with a file upload, they will see something like this:

Clicking into the field allows the user to choose a file on their computer. Once a file is chosen, the file name and size are displayed.

How to Set up File Uploads

When editing a node, do the following:

  1. Go to Data Collection Form Fields, and select Add Form Field:

    2022-04-29_10-50-21.png

  2. Choose File as the field type, and enter a variable name and label for the upload button:

    2022-04-29_10-51-55.png

Temporary File Uploads

The Temporary File field type functions identically to the standard File type, with one key difference: files are automatically deleted after a short retention period. Use this field for non-permanent data that does not need to be stored indefinitely.

Note on Expiration: Files are flagged for deletion 24 hours after upload. However, because our system purges these files in a daily batch process, the actual lifespan of a file will range between 24 to 48 hours, depending on the time of day it was uploaded.

Vault File Uploads

The Vault File field is a specialized input designed for sensitive documents that require private, restricted storage.

Unlike the File and Temporary File input types, which generate a direct link that can be used immediately within the workflow for things such as images, email notifications, or integrations, a Vault File is stored in a restricted zone and cannot be accessed via public URL.

Instead of a URL, this field stores a unique identifier (file_uid) in the session variable. You must use our authenticated API endpoints to programmatically retrieve these files.

Note: Only choose this file type if you have a backend process configured to handle this specific retrieval method.

Secure Authenticated Downloads

After uploading a file via the File or Temporary File input type, it will be publicly available through the URL saved to the session variable. You can opt to create a secure link to access the file it that is accessible via HTTPS and requires an agent login to download.

Format:

https://zingtree.com/authenticated-download.php?var=VARIABLE_NAME&session_id=SESSION_ID

The parameters:

  • var: Name of the session variable for the uploaded file URL.

  • session_id: The session ID for the uploaded file. Use #session# as a placeholder within node content to display the ID of the active session, i.e. &session_id=#session#.

Uploading and Displaying Images

If you're uploading an image file, and want to display it on another node, here's a trick. As an example, if the image upload variable is image1, you would add an image placeholder with an id of image1. For this example, you would put this HTML code (using code view) into the node that displays the image:

<img id="image1" class="img-responsive">

Note: This only works for images uploaded via the File or Temporary File input types.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Didn't find what you need?

Our friendly customer support team is here to help

Submit a Request

Looking for help or advice?

Reach out to our knowledgeable community of users.

Zingtree Community