4 min readUpdated Mar 2, 2026

fileUpload Documentation

Purpose

The fileUpload logic component is designed to handle file uploads within the Vantage analytics and data platform. Its primary function is to process uploaded files, convert them into a structured format with associated metadata, encode their content in Base64, and if needed, store them in cloud storage services like Google Drive or OneDrive. This allows the platform to capture, manipulate, and store files efficiently for further analysis.

Settings

The fileUpload component has several configuration settings which dictate its behavior and interaction with uploaded files. Below is a detailed breakdown of each setting.

1. uploadedFiles

2. uploadId

3. saveToDrive

4. driveSubfolder

How It Works

  1. File Upload Handling: The component starts by checking if any files have been uploaded. If no files are detected, it returns an error message.
  2. Base64 Content Check: It verifies if the uploaded files contain valid Base64 content. If not, it attempts to retrieve the file content from Redis using the provided uploadId or a stable workflowId.
  3. Row Creation: The component iterates over the uploadedFiles, capturing their metadata (name, mimeType, size) and computing the Base64 content, along with generating a data URI for image files.
  4. Cloud Storage Integration: Depending on the saveToDrive setting, the component establishes a connection with either Google Drive or OneDrive to save the file content in the specified cloud storage service.
  5. Error Handling: Errors during cloud storage interaction are logged, and relevant error messages are associated with the respective files.
  6. Output Data Structure: The component returns an array of objects containing processed file details and their statuses.

Expected Data

The fileUpload component expects the following data structure in the uploadedFiles setting:

json
uploadedFiles: [
    {
        "name": "exampleFile.txt",
        "mimeType": "text/plain",
        "size": 1234,
        "base64": "SGVsbG8gV29ybGQh" // Base64-encoded content
    }
]

Use Cases & Examples

Use Case 1: Document Management System

A business can utilize the fileUpload component to enable users to upload documents for storage and easy access later. The documents can then be directly uploaded to a designated folder in Google Drive for centralized management.

A web application for a photography portfolio can harness this component to allow photographers to upload their images. Each image can be stored alongside its metadata, and additional features such as displaying images on the front-end using data URIs can be easily implemented.

Consider a legal firm that requires clients to upload contracts digitally for processing and review. The configuration for the fileUpload component could look like this:

json
{
  "uploadedFiles": [
    {
      "name": "contract_agreement.pdf",
      "mimeType": "application/pdf",
      "size": 204800,
      "base64": "JVBERi0xLjcg....." // Base64-encoded PDF content
    }
  ],
  "uploadId": "12345abc",
  "saveToDrive": "googledrive",
  "driveSubfolder": "Legal Contracts"
}

In this example:

The configuration enables seamless management of client contracts while utilizing Vantage’s powerful analytics capabilities for processing.