Upload Storage File
Upload Storage File
Section titled “Upload Storage File”Type: storage-upload-file · Package: Storage Activities v1.0.5 · Output: object
Uploads a file from the robot’s disk to a bucket in Zoan Cloud Storage. Returns the file reference (id, bucket, name, size…), which you can pass to other activities, other processes or an AI Workflow.
How it works
Section titled “How it works”- Reads the file at
path(fails if it doesn’t exist). - Uploads it to the
bucketbucket (defaultby default) with the namename(by default, the file’s name). If the bucket doesn’t exist, it is created. - If there is already a file with the same name in the same bucket, it replaces it and keeps its
id. That makes repeating the upload safe: it doesn’t create duplicates.
Zoan Cloud checks every file before storing it:
- It detects the type from the actual content, not from the extension. It rejects executables, scripts and HTML or SVG files.
- It scans it for malware; if it finds a threat, it rejects the file and doesn’t store it.
- It checks that the organization has space in its storage (when replacing a file, only the size difference counts).
- It accepts files up to 100 MB.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
path | string | — | Local path of the file to upload. E.g.: C:/reports/sales.xlsx. |
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | file name | Target name inside the bucket. It can include folders (2026/sales.xlsx). |
bucket | string | "default" | Bucket name: letters, digits, ., _ and -, up to 120 characters. |
Output
Section titled “Output”Returns an object (dictionary) with the stored file reference:
| Field | Type | Description |
|---|---|---|
id | string | File id. If you replaced an existing file, it’s the same id as before. |
bucket | string | Bucket where it was stored. |
name | string | Name inside the bucket. |
size | number | Size in bytes. |
content_type | string | Detected content type. |
created_at | string | File creation date (the original one, if it was replaced). |
Read them with file["id"], file["name"]…
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
'path' is required. | You didn’t set path. |
File not found. | The path doesn’t exist on the robot’s machine. Check the path or generate the file first. |
Storage activities require a Zoan Cloud runtime context. Missing: … | The process isn’t running from Zoan Cloud or from the Designer signed in. |
… HTTP 400: …Invalid bucket name… | The bucket name has characters that aren’t allowed (spaces, /, accents) or more than 120 characters. |
… HTTP 400: …Bucket '…' is read-only; uploads are not allowed. | The bucket is read-only. Use another one or ask an administrator to change its settings in Storage. |
… HTTP 400: … (blocked type or malware) | The file content is of a blocked type or contains malware. Nothing is stored. |
… HTTP 403: … (STORAGE_QUOTA_EXCEEDED) | There’s no space available. Delete files you no longer use (for example with Delete Storage File) or ask for more storage. |
… HTTP 404: … (BUCKET_NOT_FOUND) | The name matches a bucket reserved by Zoan Cloud. Use another name. |
All of them arrive with the prefix “Could not upload the file: ”. Catch them with Try / Catch; a transient network error can be retried with Retry.
Example
Section titled “Example”Upload Storage File path = "C:/reports/daily-close.pdf" bucket = "reports" name = "2026/09/daily-close.pdf" → output: fileGet Storage File URL id = file["id"] → output: linkLog level = info message = "Report saved with id " + str(file["id"])Related activities
Section titled “Related activities”- Download Storage File — bring the file back to a machine.
- Get Storage File URL — share the file with a temporary link.
- List Storage Files — see what’s in the bucket.