Upload a file (deprecated)
POST/api/v1/storage/upload-file
Deprecated.
Deprecated — use the 3-step pre-signed flow instead (generate-upload-url → PUT → register-uploaded-file).
Uploads file content synchronously to the specified folder. For large files, prefer the pre-signed flow to avoid sending the full content through this operation.
The following access conditions are preserved as declared intent and are not implemented by generated code: Accepted storage owner context, Storage owner actor routing.
Use this in a guide: Add file attachments to a support request
Request
Responses
- 200
File uploaded successfully
Upload the base64 encoding of Hello followed by a newline.
Section ID: DOC-CP-files-data-api-uploadFile#example-storage-uploadFile-request
Request example
{
"folderPath": "reports",
"fileName": "welcome.txt",
"content": "SGVsbG8K",
"contentType": "text/plain"
}
Illustrative response shape; omitted default fields and actual outcomes depend on the operation.
Section ID: DOC-CP-files-data-api-uploadFile#example-storage-uploadFile-response
Response example
{
"file": {
"fileId": "example_123",
"name": "example",
"path": "documents/example.txt",
"folderPath": "documents/example.txt",
"sizeBytes": "1",
"contentType": "Example text",
"uploadedAt": "example",
"modifiedAt": "example",
"metadata": {},
"tags": [
"example"
],
"description": "example",
"storageRef": {
"bucket": "example",
"key": "example_123",
"provider": "STORAGE_PROVIDER_GCS"
},
"checksum": "example",
"version": 1
},
"uploaded": true
}
Document ID: DOC-CP-files-data-api-uploadFile. Section identities and revisions.
| Section | Stable reference |
|---|---|
| Upload a file (deprecated) | DOC-CP-files-data-api-uploadFile#overview |
| Request | DOC-CP-files-data-api-uploadFile#request |
| Responses | DOC-CP-files-data-api-uploadFile#responses |