Delete Storage File
Delete Storage File
Section titled “Delete Storage File”Type: storage-delete-file · Package: Storage Activities v1.0.5
Deletes a file from a bucket in Zoan Cloud Storage. Use it to clean up temporary or already processed files and free up the organization’s storage.
How it works
Section titled “How it works”- Identifies the file by its
idor bybucket+name. If you setid,bucketandnameare ignored. - Deletes it permanently: there’s no recycle bin.
It fails if the file doesn’t exist in the environment or if the bucket is marked as read-only. So if you call it twice with the same reference, the second call fails with File not found: if your flow may repeat the delete, catch that error with Try / Catch.
Required parameters
Section titled “Required parameters”None. But you must set id or name; otherwise the activity fails with “Provide ‘id’ or ‘name’.”.
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
id | string | — | File id (alternative to bucket + name). |
name | string | — | File name inside the bucket, including its folders. E.g.: 2026/sales.xlsx. |
bucket | string | "default" | Bucket name. Only used with name. |
Output
Section titled “Output”This activity does not return a value.
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
Provide 'id' or 'name'. | You set neither id nor name. |
… HTTP 404: …File not found in this environment. | The file doesn’t exist in the environment (or was already deleted). |
… HTTP 400: …Bucket '…' is read-only; deletes are not allowed. | The bucket is read-only. An administrator can change it in Storage. |
Storage activities require a Zoan Cloud runtime context. Missing: … | The process isn’t running from Zoan Cloud or from the Designer signed in. |
Errors arrive with the prefix “Could not delete the file: ”.
Example
Section titled “Example”Download a file, process it and delete it from the bucket:
Download Storage File bucket = "inbox" name = "order-0001.csv" destination = "C:/work/order-0001.csv" → output: path ... process the order reading = path ...Delete Storage File bucket = "inbox" name = "order-0001.csv"Related activities
Section titled “Related activities”- List Storage Files — see which files exist before deleting.
- Download Storage File — download the file before deleting it.