Skip to main content

Stage a file

PUT 

/deposit/:id/file/:fileId

Optional core — provided when deposit.supported is true. See the Deposits guide.

Stage a file in this deposit. {fileId} is the file entity's @id in the deposited metadata document, percent-encoded — for attached files, its crate-relative path. The metadata document and files may be staged in any order.

Two upload modes share this endpoint, discriminated by the request Content-Type; the implementation declares which it supports in the fileUpload capability:

  • Inline (fileUpload contains inline): the request body is the file's bytes, sent with the file's own media type. Responds 204.
  • Presigned (fileUpload contains presigned): the request body is application/json transport metadata (size, checksum, media type) and the response is 200 with an upload target the client sends the bytes to directly. There is no per-file completion call — finalise verifies that the bytes landed and match the declared size and checksum.

Only transport metadata is carried here; descriptive metadata about the file lives in the metadata document. Staging the same {fileId} again replaces the earlier staging. Using a mode the implementation does not declare is rejected with 400.

Request

Responses

Transport metadata staged (presigned mode) - upload the bytes to the returned target