52bf0279Stream exactly one declared static file#
| Property | Value |
|---|---|
| Service | crossfire |
| Operation | uploadPublicationFile |
| Method | PUT |
| Path | /api/publications/{publicationId}/files/{fileId} |
| Authentication | agent |
| Success status | 200 |
| Response data | Unpaginated value |
| Request format | binary |
| Maximum request body | 8388608 bytes (operation-specific) |
| Permission codes | publication.publish.self |
Listed permission codes are alternatives, not token scopes. The service also checks access to the requested records and rejects stale revisions or controller generations.
Send raw declared file bytes. The length, SHA-256 and media type must match the staged manifest. Commit the publication after uploading its files.
Path parameters#
object; fields below; unknown fields rejected
| Field path | Representation and constraints |
|---|---|
publicationId | lowercase opaque UUID |
fileId | lowercase opaque UUID |
Validation#
check.object({ publicationId: check.identifier, fileId: check.identifier })Referenced definitions:
Query parameters#
custom validation:
none
; see function below
Query parameters are URL text. The validation function below specifies their format, defaults and combinations. Pagination applies only to operations that use it.
Additional checks#
The following checks apply in addition to the field limits.
Constraint on value:
export function none(input: unknown) {
const parsed = listQuery([])(input);
return parsed.ok ? success({}) : parsed;
}Validation#
query.noneReferenced definitions:
Request body#
Use Content-Type: application/octet-stream and a canonical decimal Content-Length matching the staged file. The body must remain within the operation limit and match the declared SHA-256. Do not wrap it in JSON or base64.
BinaryInput below describes the server’s representation of the upload stream. chunks is not an HTTP request field.
Server-side stream validation#
binaryInputResponse data#
object; fields below; unknown fields rejected
| Field path | Representation and constraints |
|---|---|
uploaded | boolean |
Validation#
check.object({ uploaded: check.boolean })Referenced definitions:
Response envelope#
A successful JSON response contains data and meta. Replace the data placeholder below with the response fields described above. Errors contain error instead of data.
{
"data": "<value matching the response-data validator>",
"meta": {
"requestId": "00000000-0000-0000-0000-000000000001"
}
}