Storage

Get a short-lived URL to upload media straight to storage

Issues a presigned URL so file bytes go directly to object storage instead of through this API. For an upload, PUT the raw bytes to signedUrl with the same Content-Type and exactly the contentLength you declared. Both are bound into the signature and a mismatch is rejected by storage. Then pass the returned resolvedKey as a mediaUrls entry or coverR2Key when creating a post. Keys are forced under your own storage prefix, so you cannot presign into another tenant's space. Uploads are capped at 500 MB for video, 15 MB for images and 10 MB otherwise, rate-limited to 20 presigns per minute per account, and counted against your storage quota.

post/storage/presign

Request

  • Base URL: https://www.juzpost.com/api/cli/v1
  • URL: https://www.juzpost.com/api/cli/v1/storage/presign
  • Auth: HTTP bearer

Request body

relativeKeystring

Path for the object relative to your storage prefix, such as media/clip_03.mp4. Only letters, digits, ., _, - and / are allowed, and .. segments are rejected. The server prepends your storage prefix and returns the result as resolvedKey.

keystring

A full storage key, used instead of relativeKey, normally only for operation: download of a key you already hold. It must already start with your own storage prefix or the request is refused with 403.

contentTypestring required

MIME type of the object, such as video/mp4 or image/jpeg. It is bound into the signature, so the PUT must send exactly this same Content-Type. It also selects the size cap: 500 MB for video/*, 15 MB for image/*, 10 MB for anything else.

contentLengthinteger

Exact byte length of the object you are about to upload. Required for uploads and ignored for downloads. It is bound into the signature, so a PUT of a different size is rejected by storage, and it is counted against your storage quota as soon as the URL is issued.

operation'upload' | 'download'

upload presigns a PUT for new bytes; download presigns a GET for an object that already exists. Downloads skip the quota and rate-limit checks.

expiresInSecondsinteger

How long the returned URL stays valid, between 60 seconds and one day. Keep it short: whoever holds the URL can use it until it expires. Allow generous client-side timeouts for large uploads within this window.

Response

A presigned URL valid for expiresIn seconds.

signedUrlstring uri required

Send the raw bytes here with a plain PUT (or GET, for a download) and no Authorization header. The signature in the URL is the credential. Never log or share this URL.

resolvedKeystring required

The storage key the URL writes to. This is the value to pass as a mediaUrls entry or coverR2Key when creating or updating a post.

expiresIninteger required

Seconds the URL remains valid, counting from when it was issued.

Changes

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