Skip to Content
Chameleon Docs
API referenceSource PDF

Create PDF upload URL

A URL that accepts one PUT of the manual's PDF, for an hour. Each call makes a new upload with a place of its own in the store, and deletes the upload the manual waited on until then with any PDF sent to it: the PDF to complete is the one sent to the upload asked for last. The PUT carries a Content-Type header equal to the answer's limits.contentType, application/pdf, which the upload is held to.

POST
/api/manuals/{id}/source/upload-url

A URL that accepts one PUT of the manual's PDF, for an hour.

Each call makes a new upload with a place of its own in the store, and deletes the upload the manual waited on until then with any PDF sent to it: the PDF to complete is the one sent to the upload asked for last. The PUT carries a Content-Type header equal to the answer's limits.contentType, application/pdf, which the upload is held to.

Authorization

headerx-api-key<token>

Scope: manuals:write

Path Parameters

id*string
Match^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

Response Body

The URL; send the PDF's bytes as the body of a PUT whose Content-Type is limits.contentType

application/json
  1. response
url*string
Formaturi
method*"PUT"
Value in"PUT"
expiresAt*string
Formatdate-time
limits*
Example Request
curl -X POST 'https://www.chameleonlabs.org/api/manuals/string/source/upload-url'
Example Response
{  "url": "http://example.com",  "method": "PUT",  "expiresAt": "2019-08-24T14:15:22Z",  "limits": {    "maximumSizeInBytes": 0,    "contentType": "string"  }}