Upload Blob
upload_blobUpload a file or blob to AFFiNE workspace storage and return a blob key for subsequent attachment to documents.
Instructions
Upload a file or blob into AFFiNE workspace storage and return its blob key. This creates stored content but does not attach it to a document by itself.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Blob content encoded according to the encoding field. | |
| encoding | No | Content encoding. Defaults to utf8; use base64 explicitly for binary data. | utf8 |
| filename | No | Optional filename stored with the upload. Defaults to a generated .bin name. | |
| contentType | No | Optional MIME type. Defaults to application/octet-stream. | |
| workspaceId | Yes | AFFiNE workspace id that owns the blob. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| ok | No | ||
| key | No | ||
| code | No | ||
| size | No | ||
| error | No | ||
| details | No | ||
| encoding | No | ||
| filename | No | ||
| retryable | No | ||
| uploadedAt | No | ||
| contentType | No | ||
| workspaceId | No |