File Steps
Steps for reading, writing, deleting, and managing files.
File Steps
File steps handle file system operations -- reading, writing, listing, uploading, and downloading files.
File steps require a storage addon to be installed (Local Storage or S3 Storage). Configure your storage addon before using these steps.
Read File
Reads the contents of a file from storage.
Path: 'uploads/' + vars.filename Encoding: utf-8 Assign To: fileContent
Write File
Writes content to a file in storage. Creates the file if it does not exist, or overwrites it if it does.
Path: 'reports/' + vars.reportId + '.json' Content: vars.reportData | toJSON Encoding: utf-8
Delete File
Deletes a file from storage.
Path: 'uploads/' + vars.oldFilename
List Directory
Lists all files and subdirectories within a directory.
Path: 'uploads/images' Recursive: false Assign To: imageFiles
Upload File
Handles an incoming file upload from a multipart form request and saves it to storage.
Field Name: avatar Destination: 'uploads/avatars' Max Size: 5242880 Allowed Types: ['image/png', 'image/jpeg', 'image/webp'] Assign To: uploadedFile
The result stored in the assigned variable includes path, originalName, size, and mimetype.
Download File
Sends a file from storage as a download response to the client.
Path: 'reports/' + vars.reportId + '.pdf' Filename: 'monthly-report.pdf' Content Type: application/pdf
The file path relative to the storage root. File encoding: `utf-8`, `base64`, `binary`. Defaults to `utf-8`. Variable name to store the file contents. The destination file path. The data to write. File encoding: `utf-8`, `base64`, `binary`. Defaults to `utf-8`. The file path to delete. The directory path to list. Whether to include files in subdirectories. Defaults to false. Variable name to store the array of file paths. The form field name for the uploaded file. Directory path to save the file. Defaults to `uploads/`. Maximum file size in bytes. Defaults to 10MB. Array of allowed MIME types (e.g., `["image/png", "image/jpeg"]`). Variable name to store file metadata (path, size, mimetype). The file path in storage. The filename presented to the client. Defaults to the original filename. MIME type for the response. Auto-detected if not specified. Steps Reference /reference/steps Browse all step categories Upload Files /guides/file-uploads Step-by-step file upload guide Encoding Steps /reference/steps/encoding Base64 encoding for file data