Processing status
Every file and version carries processing, an object with one value per step, and renditions, one entry per derived copy. This page lists every value and what the API does in each case. How processing works is on Processing.
"processing": { "sniff": "done", "policy": "done", "hash": "done", "scan": "clean", "metadata": "done", "sanitize": "done", "renditions": "done", "text": "skipped", "publish": "skipped", "notify": "done" }The steps
Section titled “The steps”The steps run in this order. Completion answers the file with every step pending.
| Step | done |
skipped |
failed |
Other |
|---|---|---|---|---|
sniff |
The type was read from the bytes | The type could not be accepted: the file is rejected | ||
policy |
The detected type is allowed | Not allowed: the file is rejected | ||
hash |
The SHA-256 is in content_sha256 |
A declared checksum differed: the file is rejected | ||
scan |
Not scanned: scanning is off, or the file is above 1 GiB | The scan could not finish; the application’s scan_failed_policy decides whether the file is served |
clean: nothing known found. infected: quarantined |
|
metadata |
media is filled |
The type has no metadata, or the file is above 2 GiB | The bytes could not be read; processing goes on | |
sanitize |
Camera metadata was removed from the image | Nothing to remove, not an image, or image_metadata: keep |
The image could not be rewritten; processing goes on | |
renditions |
At least one rendition is ready | The type has none, renditions are off, or the file is too large | No rendition could be made; processing goes on | |
text |
Text was extracted for content search | No text in this type, or extraction is off | The bytes could not be read; processing goes on | |
publish |
The public copy of a public file was written |
The file is not public |
||
notify |
file.ready was sent: processing is over |
The version is not the current one |
pending means the step has not run yet. A completion of more than 1,000 parts also reports complete: "pending" until the file becomes available.
How it ends
Section titled “How it ends”| Outcome | What you see | Events |
|---|---|---|
| Ready | notify: "done". Any step that failed on the way (metadata, sanitize, renditions, text, or a scan the application lets through) shows as failed; the file is served |
file.ready |
Rejected (sniff, policy or hash) |
The bytes are deleted, the file is in the trash with trashed_by: "system" and trash_reason, the quota is released. A rejected new version leaves the file on its previous version |
file.failed with the step and the reason |
| Quarantined | scan: "infected", state: "quarantined"; never served. See Malware scanning |
file.quarantined |
| Stopped | A step is failed and the steps after it stay pending: a scan that failed under scan_failed_policy: block, or a step that kept failing after 5 attempts |
file.failed with the step |
ccs-files-client’s files.waitUntilReady (1.1.0) resolves on “ready” and rejects on the three others, with file_rejected, file_quarantined or processing_failed (body.step).
Renditions
Section titled “Renditions”Each entry of renditions has status, mime_type, size, width, height and duration_ms (null when unknown), and error when it is skipped or failed.
status |
Meaning | Its URL |
|---|---|---|
pending |
Not made yet | 404 rendition_not_available |
ready |
Made | Minted like the original |
skipped |
Not made for this file; error says why |
404 rendition_not_available |
failed |
Making it failed; error holds the reason |
404 rendition_not_available |
The reasons of the video renditions mp4_720p and mp4_1080p: source_smaller, duration_exceeds_limit, size_exceeds_limit, duration_unknown (Previews and renditions).
File and version states
Section titled “File and version states”state |
Of | Meaning | Served |
|---|---|---|---|
pending_upload |
File | The ticket is not completed | No: 409 file_pending |
available |
File, version | Stored; processing may still run | Yes, within the scan policy (409 scan_pending otherwise) |
quarantined |
File, version | Malware was found | No: 409 file_quarantined |
trashed |
File | In the trash, by a user or by the system after a rejection | No: 409 file_trashed |
rejected |
Version | Processing refused the bytes | No |
Read the status with GET P/files/:file_id, a version’s with GET P/files/:file_id/versions/:version_no, the renditions with GET P/files/:file_id/renditions.