Snapvisor Docs

Upload a file to a proxied upload target

Receives one file for an upload target returned by `createBuild` (`postUrl` + `fields`) or `createMedia` (`upload.url` + `upload.fields`) when the object store does not implement S3 presigned POST (e.g. Backblaze B2); on other stores the URL points at the store itself and this route is not used. Behaves like an S3 POST-object endpoint: send the `fields` as form fields, then the file. No bearer token: the signed `policy` field is the authorization.

POST
/uploads

Receives one file for an upload target returned by createBuild (postUrl + fields) or createMedia (upload.url + upload.fields) when the object store does not implement S3 presigned POST (e.g. Backblaze B2); on other stores the URL points at the store itself and this route is not used. Behaves like an S3 POST-object endpoint: send the fields as form fields, then the file. No bearer token: the signed policy field is the authorization.

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

An S3 POST-object style form: the fields, then one file part named file. Before the file part, more than 20 fields or a value over 4096 bytes is a 400, and so is a first file part with another name. Fields and extra file parts sent after the file part are ignored.

Response Body

application/json

application/json

application/json

text/html

application/json

curl -X POST "https://example.com/uploads" \  -F Content-Type="string" \  -F policy="string" \  -F file="string"
Empty