Files
Upload a visual to a signed URL
The uploadUrl of createFileUpload: send the file's bytes as the body, with its Content-Type. No Authorization header: the token stands in for it. Callable from a browser on any origin (CORS, with its preflight). The content must match the type announced when the URL was made. Limited per IP address (RATE_LIMITED, with Retry-After).
Request
Authorization
None: this route answers without an API key.
Path parameters
tokenstringrequiredThe signed token, asuploadUrlholds it
Body image/png
Responses
201The file is stored
successbooleanfileUploadedFile
400Empty body (EMPTY_BODY), or content that is not the announced type (CONTENT_TYPE_MISMATCH)
Type: Error
401Forged or expired token, or one made for another use (INVALID_UPLOAD_TOKEN)
Type: Error
403A live URL used on the sandbox host (SANDBOX_REQUIRES_TEST_KEY)
Type: Error
409The URL already stored its file (UPLOAD_LINK_USED): ask for a new one
Type: Error
413Over 25 MB (FILE_TOO_LARGE)
Type: Error
422A PDF that cannot be prepared for print (INVALID_FILE)
Type: Error
429Too many uploads from this address (RATE_LIMITED)
Type: Error
500Internal server error (UPLOAD_FAILED)
Type: Error