Upload File
nextcloud.upload_file
ActionFiles & storageconnection required
Calls the Nextcloud API with the connection's credentials.
Upload bytes to a path, creating the file or replacing what is there. The parent folder must already exist — create it with nextcloud.create_folder.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- Username & password
- Providers
- Nextcloud
- Secret shape
- {"username": "…", "password": "<app password>"}
- Config it needs
- base_url
- Resolved by
- config.connection_id, else node.connection_id
Configuration
4 fields, 2 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
path Path inside the account's Nextcloud files, e.g. /Documents/report.pdf. | string | Yes | — | — | /Documents/report.pdf |
file_content The file contents: base64 when content_encoding is 'base64', otherwise the text to write. | string | Yes | — | — | — |
content_encoding Set to 'base64' when body is a base64 blob (e.g. from a download_archive node). Defaults to the upstream file's encoding, else text. | string | No | — | one of "text", "base64" | — |
content_type MIME type to send; defaults to application/octet-stream. | string | No | — | — | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"path": "/Documents/report.pdf"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
path The path that was written. | string | — |
created True when the file did not exist before (HTTP 201). | boolean | — |
replaced True when an existing file was overwritten (204). | boolean | — |
status_code The WebDAV status Nextcloud answered with. | number | — |
file_id The new file's id, when the server sent OC-FileId. | string | — |
etag The stored file's ETag, when the server sent one. | string | — |
size How many bytes were uploaded. | number | — |
{
"created": false,
"etag": "",
"file_id": "",
"path": "",
"replaced": false,
"size": 0,
"status_code": 0
}See Upload File run in a workflow.
In a technical demo we add the Nextcloud connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.