- 18 Apr 2024
- 3 Minutes to read
- Print
- DarkLight
File Type Overview
- Updated on 18 Apr 2024
- 3 Minutes to read
- Print
- DarkLight
Overview
This article demonstrates how users can handle and manage File types within the platform.
File Data
File Reference
File Reference Entity
File Data
File Data is a Data Type used for file handling and is stored as a Byte Array within a Flow. This data is handled as Flow data and increases the overall size of the Flow. By using a Create Data step or by defining Input/Output Data as File Data, users can utilize files within their Workflows.
File Data stores the following information on the file to assist when processing/referring to the file within a Flow:
File information | Description |
---|---|
Id | Id for which the file is stored under |
FileName | String value for the imported file's name |
Length | Numerical value denoting the size of the file's byte array |
FileType | Type of File Extension (.pdf, .docx, .csv, etc.) |
Contents | Byte Array of the file. It contains the raw bytes of the file's content. |
There are some limits to the size of the file being used as a Flow input. Connections via HTTP1.1 are limited to 28.6 MB. Connections via HTTP/2 are only limited by the processing and RAM limitations of the server.
File Reference
File References provide a way to access a file through a Flow or process without loading the File data within the Flow memory. Instead, the file will be stored and accessed within the shared FileStorage, increasing efficiency by reducing the amount of data accessed by a Flow. This is advantageous over FileData for large files, as the file does not need to exist in memory to be utilized.
To utilize File References in a Flow, steps such as the Load From Path or Load From File Data allow users to create a File Reference that can be used within a Flow.
File Reference includes the following information to be used within a Flow.
File information | Description |
---|---|
FileDateTime | Modified Date Time of the file. |
Id | Id for which the file is stored under |
FileName | String value for the imported file's name |
Size | Numerical value denoting the length of the file's byte array |
Data | File Reference also includes File Data by default. Using this will pass the entire file's data within the Flow. This is only visible if the mapping type of the step is set to Select from Flow. |
Note: Decisions will not store any File Reference data in the platform. Thus, if the file is not present in the file storage, it might cause the Flow to break.
File Reference Entity
File Reference Entities are an extension of the File Reference and behave similarly to File References. Rather than storing the file data within the file storage, the File Reference Entity stores the file data within the Decisions Instance via a Folder or Designer Project that can be referenced within the Flows.
To utilize File Reference Entity in a Flow, users must create the File Reference Entity data within the platform. Steps such as Add Reference to Folder.
Example:
This example demonstrates creating a File Reference Entity using the 'Add Reference to Folder' Step.
Create a Flow. From the toolbox, add the ' Load From File Data' Step and connect it to the input step.
From the Step Properties Panel > Inputs, configure the File input property to constant. This will allow the users to upload a file as input to the Flow. Upload a Test File.
From the toolbox, add the ' Add FileReferences To Folder' Step and connect it to Load From File Data and output, as shown in the following image.
From the Step Properties Panel > Inputs, configure the File References input property to Build Array. This will allow to pass a single File Reference. Map Item 0 to the output of the 'Load From File Data' Step.
Configure the Folder ID property to constant and give a Folder ID. The folder ID can be found by right-clicking a Folder > Manage > Get Folder/Designer Folder ID.
Debug the Flow. Navigate to the folder associated with the provided Folder ID to confirm that the new FileReferenceEntity is created. Files under the file reference entity can be created.