File
Stores, retrieves, deletes or checks files in a storage provider of your project. In the toolbox the step is called File.
:::info Runs on hosted workers The File step needs Blokkio's storage and database, so it always runs on hosted workers. If your project is assigned to a self-hosted worker pool, File steps still run on hosted workers automatically, and the other steps of the workflow run on your pool. :::
Properties
| Property | Required | Description |
|---|---|---|
| Provider | Yes | The storage provider to use, from your project's storage settings |
| Operation | Yes | Store, Retrieve, Delete or Exists |
The other fields depend on the operation.
Store
Saves a file to the selected provider.
| Field | Required | Description |
|---|---|---|
| File | Yes | A file from another step — an HTTP Request file response, a Webhook upload, Convert to File, or another File step |
The original file name and content type are kept. The output is a file reference: the storage provider, the file id, the file name and the content type. Pass it to any step that accepts a file, or keep the file id (for example in your database) to retrieve the file later. To store plain data, turn it into a file with Convert to File first.
Retrieve
| Field | Required | Default | Description |
|---|---|---|---|
| File reference | Yes | — | A file reference from another step, or a bare file id (then the selected provider is used) |
| Load content into the workflow | No | Off | Off: output the file reference. On: output the file content itself (max 25 MB) |
The step fails if the file doesn't exist. Most steps that take a file (HTTP Request, Parse CSV, Parse JSON…) accept the reference directly, so you rarely need to load the content.
Delete
| Field | Required | Description |
|---|---|---|
| File reference | Yes | A file reference or file id |
Output:
{ "deleted": true, "fileId": "9b1e…" }
Exists
| Field | Required | Description |
|---|---|---|
| File reference | Yes | A file reference or file id |
Outputs true or false. Branch on it with an If / Else:
{{ $nodes['File'] }} is true.
Notes
- When a provider is selected, it takes precedence over the provider stored in a file reference.
- Each plan includes a storage quota for the workspace; a store that would exceed it fails. See plan limits.