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 (
fileUploadcontainsinline): the request body is the file's bytes, sent with the file's own media type. Responds204. - Presigned (
fileUploadcontainspresigned): the request body isapplication/jsontransport metadata (size, checksum, media type) and the response is200with 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
- 200
- 204
- 400
- 401
- 403
- 404
- 409
- 413
- 429
- 500
Transport metadata staged (presigned mode) - upload the bytes to the returned target
File staged (inline mode)
Bad Request - invalid transport metadata, or an upload mode the implementation does not declare
Not authenticated
Access token does not have the required scope
Deposit not found - unknown, or expired and cleaned up
Conflict - the deposit is not in the open state
Content Too Large - the file exceeds the implementation's declared maxFileSizeBytes
Rate limit exceeded
Response Headers
Request limit per time window
Requests remaining in current time window
Unix timestamp when the rate limit resets
Number of seconds to wait before retrying
Internal Server Error