Action File System
File Data Operations
Read any file from disk to base64 or save base64 data as any file type. Useful for passing binary files through data connections between nodes.
Node IDFileDataOperationsAction
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Operation operation | enum | Yes | write | 'read' loads a file and outputs its contents as base64. 'write' saves incoming base64 data as a file. |
File Path filePath | file_picker | Yes | — | For 'read': path to the file to load. For 'write': path where the file will be saved (include extension). |
File Data (Write Mode) fileData | textarea | No | — | The raw file data as a base64 string. Only used in 'write' mode. Can be set by a data connection. |
Data Type dataType | enum | Yes | base64 | Format for file data. Both options transmit as base64 strings; 'bytes' is a semantic hint for downstream nodes. |
Overwrite overwrite | boolean | No | false | If true, overwrites an existing file at the output path. Only used in 'write' mode. |
Create Directory createDirectory | boolean | No | true | If true, creates parent directories if they do not exist. Only used in 'write' mode. |
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
Execute input0 | object | Yes | Triggers the operation. |
Outputs
| Output | Type | Identifier | Description |
|---|---|---|---|
On Success output0 | string | fileData | For 'read': the file contents as a base64 string. For 'write': the path to the saved file. |
On Error output1 | string | error_message | Fires when the operation fails, carrying an error message string. |