API reference / Documents

put/v1/storage/local

Upload one object (local storage driver)

Operation
localStorageUpload
Authentication
None — public

Receives the bytes a presigned S3 PUT would receive in production. Only exists when `LOCAL_STORAGE_DIR` is set; 404 otherwise, including in production.

This is the one place a document transits the API, which is precisely why it is development-only: production sends the browser straight to R2.

Request

Parameters

keyqueryrequiredstring
expiresqueryintegernull
signaturequeryrequiredstring

Body

Free-form JSON object.

Responses

200Stored.
okbooleanrequired
bytesintegerrequired
403The signature is invalid or the URL has expired.
404Local storage is not the driver in this deployment.

Example

curl
curl -X PUT https://api.haavisa.com/v1/storage/local?key=<key>&signature=<signature>

More in Documents

Something unclear? The eligibility guide explains the model behind the answers; the errors guide covers the envelope.