HTTP Data API
HTTP API - Attachments
with the attachment data type, you can link extensive binary data, such as avatar images, videos, and pdfs, to a document this article provides an overview of the attachment related endpoints and functionality available for the http data api attachments consist of two distinct parts metadata and a binary large object ( blob ) datastore (see docid\ a6a5zsvtwsjg4qjg87hiy ) uploading attachments using the multipart form method, upload the raw binary contents of the file you want to attach although ditto will eventually support attaching files of up to 20 mb in size, the current infrastructure supports only a 1 mb maximum limit curl x post "$host/api/v4/attachments/upload" \\ \ header "authorization bearer ${api key}" \\ f 'file=@post png' \#=> {"id" "rugmuxzhdrh1x94uh qcrkzuhv5 j6ofd1c9eafmxnzdmq", "len" 261322} downloading attachments using /api/v4/attachment/{attachment id} , download attachments curl "$host/api/v4/attachments/${attachment id}" \\ \ header "authorization bearer $api key" \\ \ output file png