Community

Request an upload target for a post image

post/api/v1/community/attachments/upload-urls

Request

  • Base URL: https://api-docs.busabase.com
  • URL: https://api-docs.busabase.com/api/v1/community/attachments/upload-urls
  • Auth: HTTP bearer

Request body

fileNamestring required
mimeTypestring required

An image type; the error names the accepted list.

contentHashstring

sha256:<hex> of the bytes. Supplying it buys store-once dedup — identical bytes resolve to the object that already exists, duplicate comes back true, and there is nothing to upload.

Response

A presigned target plus the URL the image will resolve to. When duplicate is true the bytes are already stored and only publicUrl matters.

uploadUrlstring required

PUT the bytes here. Empty when duplicate is true, because there are none to send.

storageKeystring required

Hand back to the confirmation call unchanged.

publicUrlstring required

Where the image resolves. This is what goes in the markdown.

expiresInnumber required

Seconds the upload URL stays valid; 0 when duplicate is true.

duplicateboolean required

These exact bytes were already stored. Skip both the PUT and the confirmation.

Changes

No recorded changes to this operation across all 1 revision of this API.