FileUploadNodeEditor Documentation
Overview
The FileUploadNodeEditor is a feature designed to allow users to upload various types of files—specifically images, PDFs, and audio files—directly to the Vantage platform. It incorporates a drag-and-drop interface as well as a standard file selection dialog. This component manages the upload process, handles errors, and supports options for saving uploaded files to cloud storage services like Google Drive or OneDrive. The uploaded files can be utilized in subsequent workflows, including those that leverage AI capabilities for image analysis, PDF extraction, and audio transcription.
Settings
The FileUploadNodeEditor component expects a configuration object that contains the following settings:
1. uploadedFiles
- Input Type: Array of Objects
- Description: This setting holds the details of the files that have been uploaded by the user. Each object in the array should contain properties such as
name,mimeType,size, and potentiallybase64(for inline small files). - Default Value: An empty array
[].
2. saveToDrive
- Input Type: Dropdown (String)
- Description: This setting determines where uploaded files are stored. The options are "Don't save", "Google Drive", and "OneDrive". Depending on the selected option, files will either be stored inline, offloaded to a selected cloud service, or discarded after upload.
- Default Value:
"none".
3. driveSubfolder
- Input Type: String
- Description: This setting can specify a subfolder within the selected cloud storage for organizing uploaded files. If the user selects a cloud storage option, this subfolder is where files will be saved. This enhances organization for users who need to handle various uploads systematically.
- Default Value:
"Uploads".
4. workflowId
- Input Type: String (optional)
- Description: This setting represents the ID of the current workflow. It may be necessary for linking uploaded files to a specific workflow context during batch uploads.
- Default Value:
undefined.
How It Works
-
File Selection: Users can drag files into the component’s drop zone or click to open a file selection dialog. The component listens for file drop events and processes files through the
handleFilesmethod. -
File Handling:
- Validation: The component filters accepted file types against a predefined list (
ACCEPTED_TYPES) and checks for size limitations (files larger than 25MB are not accepted for inline storage). - Inline Storage vs. Offloading:
- Files under 512 KB are stored as base64 encoded strings within the configuration.
- Files larger than 512 KB are uploaded in chunks to a Redis-backed storage solution, with only file metadata kept in the configuration.
- Validation: The component filters accepted file types against a predefined list (
-
Error Handling: If an error occurs during upload (e.g., file format unsupported or exceeding size limits), the component displays an appropriate error message.
-
Integration with Workflow: The uploaded files are stored in the workflow configuration and can be manipulated (removed or cleared) as required.
-
Cloud Storage Integration: Users can choose to save files to either Google Drive or OneDrive. The specified subfolder is used to organize these uploads.
-
User Feedback: The component provides real-time feedback to users, including uploading indicators and notifications about any errors or successful uploads.
AI Integrations
The FileUploadNodeEditor is poised for use with Vantage's AI capabilities. Once files are uploaded, they can be:
- Processed by AI Models: Images can be analyzed, PDFs can be scanned for data extraction, and audio can be transcribed. The uploaded files serve as input for these AI workflows, enhancing the analytical capabilities of the platform.
Billing Impacts
The use of the FileUploadNodeEditor may have billing implications based on the following:
- Storage Costs: Files stored in cloud repositories might incur costs based on the storage service’s pricing model (Google Drive or OneDrive).
- Data Transfer Fees: Uploading large files could incur data transfer charges depending on the user's cloud service agreements.
- AI Processing Fees: If the uploaded files are subsequently processed by Vantage’s AI tools, this may also result in additional costs based on the usage of the AI offerings.
Use Cases & Examples
Use Cases
- Documentation Management: A user could upload training manuals in PDF format, which can then be extracted for key data points and summarized through AI text analysis.
- Media Asset Handling: An advertising agency might upload various media assets (images and audio files), which will be used in different workflows for marketing campaign analysis and reporting.
- Educational Content: An educator can upload audio recordings of lectures and relevant images, enabling the generation of transcribed notes and analysis of student engagement through AI-driven metrics.
Detailed Example
Scenario: A marketing team requires a systematic way to collect and store creative assets for a campaign.
Configuration Sample:
- uploadedFiles:
[](initially empty) - saveToDrive:
googledrive - driveSubfolder:
Marketing Campaigns - workflowId:
123456
Workflow Usage:
- The marketing team selects and uploads multiple assets (images and audio files) through the
FileUploadNodeEditor. - As files are uploaded, they become listed under
uploadedFiles, and the user can select "Google Drive" to automatically store these assets in the "Marketing Campaigns" folder. - The uploaded audio files are then sent for transcription using Vantage's AI-powered transcriber, enabling quick access to conversational content related to the marketing strategy discussions.
In this structured manner, the FileUploadNodeEditor serves an integral role in creative asset management and AI operations within Vantage’s analytics framework.