Upload an attachment
Uploads an attachment to the vault's storage backend. Send the raw bytes as application/octet-stream with path, mtime and optional mime_type in the query string, or (legacy) base64 JSON. Attachments are a paid-tier feature (402 on Free, which is also limited to text MIME types), the MIME type and extension must pass the whitelist (415), the file must be within the per-plan size and total-quota limits (402), a raw body over the request ceiling returns 413, a raw body that stalls returns 408, a non-numeric mtime or mime_type returns 422, and a storage backend failure returns 502.
Request
- Base URL: https://api.engram.page
- URL: https://api.engram.page/api/attachments
- Auth: HTTP bearer
Query parameters
Vault-relative path. Required for an octet-stream body.
File mtime in seconds (octet-stream body).
MIME override; detected from the extension when absent (octet-stream body).
Request body
Example request
{
"content_base64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"mime_type": "image/png",
"path": "assets/diagram.png"
}Response
Uploaded
Example response
{
"attachment": {
"path": "assets/diagram.png"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.