A file is a value, as any other.
A field of files belongs to a released layer. So a new image is validated, approved, published and rolled back with the rest of its record.
| A field of files | What the engine does |
|---|---|
| Accepts | Images in JPEG, PNG or WebP, and documents in PDF, as the field names them. |
| Checks | The largest size of a file, and the least width and height of an image. |
| Stores | Each file by the SHA-256 digest of its bytes. Each record gives it a name. |
| Resolves | As any value does: a file set at the global root shows at every level, and one set at a level replaces it there. |
| Shows your code | The digest, name, size, media type, width and height of a file. Never its bytes. |
What a field declares
The engine reads the media type from the bytes of a file, never from what its caller says.
| A file is | What happens |
|---|---|
| Uploaded | Whoever may change the layer uploads it to the domain, in one HTTP request. |
| Processed | A file is processing, ready or failed. A failed file says why. |
| Named | A change names a ready file by its digest. Otherwise its run fails, and names the file. |
| Kept | While the live state, a kept release or a run that waits names it. |
| Dropped | A day after nothing names it, it goes with its renditions. |
From upload to release
You read where a file is named: each record, field and level of the live state, of a kept release and of a run that waits.