Create a presigned upload
create_uploadUpload a LOCAL PNG or JPEG (up to 10 MB) through a one-time presigned PUT; use it when this server is remote and you have a shell.
Instructions
Upload a LOCAL PNG or JPEG (up to 10 MB) through a one-time presigned PUT; use it when this server is remote and you have a shell. Pass media_type, the exact size in bytes and the file's sha256 (sha256sum <file> or shasum -a 256 <file>). Within 15 minutes run: curl -X PUT -H 'content-type: <media_type>' --data-binary @<file> '<put_url>' (curl sends the content-length itself; both headers must match what you declared). Once the PUT finished, the upload_id works as {upload_id, rights_confirmed: true} in quote_image, generate_image, quote_video and generate_video; before that they answer upload_not_finished. Call get_upload to confirm and to read content_digest, width and height; other tools that take an upload_id need that call first. Use the upload_id within 24 hours. Free; counts toward 20 uploads per day.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bytes | Yes | Exact file size in bytes | |
| sha256 | Yes | Lowercase hex SHA-256 of the file | |
| filename | No | ||
| media_type | Yes |