Download attachment bytes

Streams the file with its stored Content-Type and a Content-Disposition: attachment header (or inline - see the inline parameter). Returns bare 404 (no JSON body) when the attachment or its bytes are missing.

get/attachments/{id}

Request

  • Base URL: https://craaft.io/api/v1
  • URL: https://craaft.io/api/v1/attachments/{id}
  • Auth: HTTP bearer

Query parameters

inline'1'

Request inline rendering rather than download. Honoured only for playable audio/video content types (audio/webm, audio/ogg, audio/mpeg, audio/mp4, audio/wav, video/webm, video/mp4); every other type is served as an attachment regardless, so this can never be used to render an uploaded document in the app's origin.

Response

File bytes

Changes

No recorded changes to this operation across all 2 revisions of this API.