upload_file_binary
Upload or overwrite binary files in Nextcloud, including images, PDFs, and archives. Provide base64-encoded content and destination path; creates file if missing.
Instructions
Upload or overwrite a binary file in Nextcloud.
Use this for images, PDFs, archives, or any non-text content. The content must be base64-encoded. For plain-text files, use upload_file instead.
Creates the file if it doesn't exist. Overwrites if it does.
Args: path: Destination path relative to user's root. Example: "Photos/photo.png" content_base64: File bytes encoded as a base64 string. May be empty to create an empty file. content_type: MIME type for the upload request (e.g. "image/png", "application/pdf"). If omitted, inferred from the path extension; falls back to "application/octet-stream". Note: Nextcloud re-derives the stored MIME type from the filename, so this mainly controls the HTTP upload header.
Returns: Confirmation message with the uploaded byte count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| content_type | No | ||
| content_base64 | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |