Uploads
Uploads in API v3: create an upload, retrieve an upload, cancel an upload, complete an upload, list upload parts, create upload part urls.
6 operations.
| Operation | Summary |
|---|---|
POST /uploads | Create an upload |
GET /uploads/{upload_id} | Retrieve an upload |
PATCH /uploads/{upload_id} | Cancel an upload |
POST /uploads/{upload_id}/completions | Complete an upload |
GET /uploads/{upload_id}/parts | List upload parts |
POST /uploads/{upload_id}/parts | Create upload part URLs |
Files4
Previous Page
Create an upload POST
Opens a multipart upload session and returns the upload plan: the part size (`part_size`) and the number of parts (`parts_total`). The API never receives file content. Request presigned URLs through the upload parts operation and send each part directly to the storage service, then complete the upload to obtain the file. Each `purpose` accepts a fixed list of file extensions (the last suffix of `filename`, case-insensitive) and a maximum size: - `image`: `.jpg`, `.jpeg`, `.png`, `.gif`, `.webp`; up to 10 MiB. - `pdf`: `.pdf`; up to 100 MiB. - `import`: `.xls`, `.xlsx`; up to 20 MiB. - `editor` and `document`: `.pdf`, `.doc`, `.docx`, `.xls`, `.xlsx`, `.xlsm`, `.ppt`, `.pptx`, `.pps`, `.ppsx`, `.odt`, `.ods`, `.odp`, `.txt`, `.csv`, `.rtf`, `.md`, `.epub`, `.jpg`, `.jpeg`, `.png`, `.gif`, `.webp`, `.svg`, `.mp3`, `.m4a`, `.wav`, `.ogg`, `.aac`, `.opus`, `.zip`, `.rar`, `.7z`; up to 100 MiB, or less when the account sets a lower attachment limit. Video files are not accepted for any `purpose`: host videos through the integrated video players. A `filename` without an extension or with an extension outside the list is rejected with `422 validation_failed` on `filename`; a `size_bytes` above the limit is rejected with `422 validation_failed` on `size_bytes`. Neither case opens an upload session. Each account has a storage quota (50 GiB unless a different quota was agreed), which also covers the accounts billed with it, such as its replicas. Files attached to student questions do not count toward it. An upload whose `size_bytes` would take the storage in use above the quota is rejected with `409 quota_exceeded` before any session is opened; `details[0]` carries `reason` set to `storage_quota`, `used_bytes`, and `quota_bytes`. Current usage and quota are available from the account usage operation. Files are never deleted or hidden because of the quota. This operation requires an `Idempotency-Key` header. The `Location` header points to the created upload session.