specs/vtc/website/upload/commit/v0_1/payload
library
Classes
-
Payload
-
Complete an upload. The outer document members are owned by the framework — SPEC
§6.3.
-
Response
-
Exactly one of
file (for a file target) and stagedUntil (for a bundle
target) is present — a rule over two members that this schema does not express.
-
UploadTarget
-
What the uploaded bytes are for, committed before any byte moves.
file: one file
at path, written into the site when the upload commits — the single-file write.
bundle: a gzip-compressed tar of the whole site, staged when the upload commits
and published by vtc/website/deploy. path is required for a file target and
forbidden for a bundle, and ifMatch is allowed only for a file — rules over
two members that this schema does not express; a community refuses a violation with
malformedRequest. ifMatch is optimistic concurrency: the write commits only if
the file's current content hash is this value.
-
WrittenFile
-
The file a
file upload wrote.
Extension Types
-
UploadTargetKind
-
UploadTargetKind is a closed set of string values defined by this specification's
schema.
Typedefs
-
ExpectedSha256
= String
-
Lowercase hex SHA-256 of the whole bundle's bytes. Kept in the hex form the 1.0
descriptor published rather than moved to DigestMultibase, because it is an
unchanged member of an existing descriptor and re-encoding it would break every
stream producer for no gain in what it checks. For a chunked transfer it is the
check over the reassembled bundle, applied after every chunk has verified
individually, so that a correct set of chunks assembled in the wrong order is still
caught.
-
ExpectedSizeBytes
= int
-
Total byte count of the bundle. A zero-length bundle is not a degenerate success —
nothing was serialized — so the floor is 1.
-
ExpiresAt
= String
-
After which the bundle is collected: staged bytes discarded, tokens and chunk
requests refused. Short by design. For a chunked transfer a recipient may move it
later as chunks are exchanged, never past its own ceiling — each chunk response
reports the current value.
-
Ext
= Map<String, dynamic>
-
Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a
reverse-DNS namespace; structure under each namespace is opaque to the framework.
-
UploadId
= String
-
Handle for one upload across begin, chunk, commit and abort, and — for a bundle —
deploy. Recipient-generated and unguessable, which is what lets a reference to
somebody else's upload be answered as not-found without confirming it exists.
Opaque: a producer quotes what it was given.
-
WebsiteEtag
= String
-
A file's content hash: the lowercase hex SHA-256 of its bytes — the
etag
vtc/website/files/list reports, and the ETag a direct read of the path returns,
without the HTTP quotes.
-
WebsitePath
= String
-
A file's path relative to the site root,
/-separated, with or without a leading
/. The community resolves it inside the site root and refuses one that escapes
the root (..), names a hidden file or directory (a segment beginning .),
carries a blocklisted extension, or contains a control character — the same rules
the public read handler applies, so nothing can be written that the site would
refuse to serve, and nothing can be read that it would not.