Here’s a schematic example for REST uploading to the Version entity via AWS S3
Request the Upload URL
curl -X GET \
'{YourSgDomain}/api/v1/entity/versions/{IdOfYourTargetVersion}/sg_uploaded_movie/_upload?filename={YourFileName}' \
-H 'Authorization: Bearer {YourToken}' \
-H 'Accept: application/json'
This will return a pre-signed AWS S3 upload URL. You’ll use that in the next step.
This will also return complete_upload dataset, including a link associated with that dataset. Use those in the final step below.
Execute the Upload
curl -X PUT \
'{YourPreSignedAwsUrl}' \
--data-binary '@{PathToFileYouWantToUpload}' \
-H 'Content-Type: {MimeTypeOfYourUpload}' \
-H 'Content-Size: {SizeOfYourFileInBites}'
Finalize the Upload
curl -d '{"upoad_info":"{DataFromComplete_Upload}", "upload_data":"{YourFileName}"}' \
'{YourSgDomain}/{LinkForYourComplete_Upload}` \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {YourToken}'