Skip to main content

Create Upload

POST 

/optimize/files

For a request too large to send inline: answers an upload id and a link to upload the request to as a file. PUT the same JSON body POST /optimize takes, gzipped, to upload_url before expires_at (15 minutes), with exactly these two headers:

curl -X PUT "$upload_url" \
-H 'Content-Type: application/json' -H 'Content-Encoding: gzip' \
--data-binary @request.json.gz

Both headers are signed into the link, so an upload without them, or after expires_at, is refused by the storage with a 403; create a new upload then. Nothing is stored or checked at this step: the file is judged when its run starts, with POST /optimize/files/{upload_id}/start.

Responses​

Successful Response