Add a new file to a silo entry with a specific UUID. The file data can be provided inline as base64 encoded data, or omitted to create a placeholder. When data is not provided, you must provide sha256, size, and mime fields, and the response will include a url field that can be used to stream/upload the file contents directly via a PUT request to that URL. For non-enrolled users, only the format and attachment categories are allowed.
put/silo/v1/entries/{entry_id}/files/{id}
Path parameters
idstring required
UUID of file to create
Example:347c5b04-cde2-11ed-afa1-0242ac120002
UUID of file to create
entry_idstring required
UUID of the silo entry.
UUID of the silo entry.
Request body
Example request
{
"category": "format",
"desc": "Invoice for January 2021.",
"embeddable": true,
"key": "pdf",
"mime": "application/pdf",
"name": "invoice.pdf",
"private": true,
"sha256": "27a0b656df99dc32124b4c49f2f3c35025f0a7453f289cbaa0701435cfcf4e28",
"size": 12345
}Response
OK
Example response
{
"category": "version",
"created_at": "2018-01-01T00:00:00.000Z",
"desc": "Invoice for January 2021.",
"embeddable": true,
"entry_id": "347c5b04-cde2-11ed-afa1-0242ac120002",
"hash": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6",
"key": "pdf",
"mime": "application/pdf",
"name": "invoice.pdf",
"previous": [
{
"created_at": "2018-01-01T00:00:00.000Z"
}
],
"size": 12345,
"stored": true
}