Problem
The tus protocol provides a metadata header (https://tus.io/protocols/resumable-upload.html#upload-metadata) to upload metadata directly in the POST request.
Our implementation in the plone.restapi uses this header only for the portal type (@type), filename and file-content type but not for the plone object metadata like title or description.
if we create a new file, we have to perform three requests:
- create a tus object with POST request
- upload the file-data with a PATCH request
- update the object metadata with a second PATCH request
If there is an error between the second and the third request, we have an uncompleted state. The plone obejct with the file is created but the metadata is not updated.
Suggested solution
We should extend the @tus-upload POST endpoint with the ability to receive and use object metadata.
POST /@tus-upload HTTP/1.1
...
Upload-Metadata: @type b64str, filename b64str, content-type, b64str, metadata b64str
The metadata property contains a base64 encoded json object of object metadata which should be updated after object creation.
This issue is a follow-up issue of #6197
Problem
The tus protocol provides a metadata header (https://tus.io/protocols/resumable-upload.html#upload-metadata) to upload metadata directly in the POST request.
Our implementation in the
plone.restapiuses this header only for the portal type (@type), filename and file-content type but not for the plone object metadata like title or description.if we create a new file, we have to perform three requests:
If there is an error between the second and the third request, we have an uncompleted state. The plone obejct with the file is created but the metadata is not updated.
Suggested solution
We should extend the
@tus-uploadPOST endpoint with the ability to receive and use object metadata.The
metadataproperty contains a base64 encoded json object of object metadata which should be updated after object creation.This issue is a follow-up issue of #6197