...
The MediaHaven REST API already allows for uploading files but this manner is not robust for uploading large files or when the network connection is unstable. Resumable uploads will fix this problem case, by offering a multipart chunked upload.
Design
Drawio sketch | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
API
Metadata
The upload API accepts the record ID as an input parameter. To obtain the corresponding session ID of the S3 multipart upload
Store the session ID as a new metadata field
RecordInformation.ResumableUpload.SessionId
with the typeHiddenField
The workflow to be started when the resumable upload is completed will be stored in
RecordInformation.ResumableUpload.Workflow
Stores the session ID in a memory cache, to prevent excessively contacting the REST API
is available in the MediaHaven REST API under the resource /uploads
Business Logic
Record status
Introduction of a new MediaHaven Record Status named
Uploading
that indicates for /wiki/spaces/CS/pages/4064772158 that its file content will be uploaded in a resumable mannerOnce the resumable upload is completed the MediaHaven Record Status changes to
New
...