Any client stack can use this flow as long as it can make standard HTTP requests.
Overview
- Request a direct upload blob payload from Terminal49.
- Upload the file bytes to the returned
direct_upload.urlusing the returned headers. - Store the returned
signed_id. - Create a Terminal49 document with
attached_document = signed_id.
1) Request a direct upload blob
Endpoint:POST /rails/active_storage/direct_uploads
Send metadata for the file you want to upload:
Blob attributes explained
Example ways to generate values
Get file size in bytes:Base64(MD5(file_bytes))):
2) Upload the file bytes to direct_upload.url
Use direct_upload.url to send the file, and send the direct_upload.headers object as request headers. Use whatever response is returned by that upload request.
3) Persist signed_id in your app
Save the signed_id with your internal record. You will use this value in the next step.
4) Create the document using attached_document
POST /documents