Files

Send a document’s bytes

The raw file, as the body, against the key POST minted. The body has to be as long as the upload said and hash to the digest it named, both of which are checked before anything is written, and R2 verifies the same digest again on the way in. The object is written before the row that names it: there is no transaction across the two stores, and an object nothing points at is swept up on a prefix pass, where a row pointing at nothing is a download that fails in front of the owner. Sending the same file twice is the same object once.

put/api/v1/documents/{id}/content

Request

  • Base URL: http://localhost:5180
  • URL: http://localhost:5180/api/v1/documents/{id}/content
  • Auth: API key in cookie better-auth.session_token

Path parameters

idstring required

Document id, for example doc_014.

Response

The bytes are on the account, with R2’s own count of them.

okunknown required

Changes

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