Looking for a specific example showing how to use the REST API to upload Version media to AWS S3
The API documentation’s “Uploading a File” section (ShotGrid REST API v1) has a crytpic entry “This is type of upload requires not extra step before making the complete upload request” (not entirely sure what that means exactly).
Haven’t found any AWS S3 - specific examples. Have tried a variety of methods and iterations, but keep getting errors and/or non-responses. Tried scouring AWS documentation as well, so far to no avail.
@Codiegladney
Ultimately I figured it out for my particular pipeline (took a lot of research and a certain amount of wild guessing). Happy to pay it forward if it helps you.
Let me know if this does the trick: use --data-binary instead of -d
If that doesn’t help, post or DM your upload code, and I’ll take a look.
Since you quoted from the non-multipart documentation, I assume you are using this (only works for files below 500mb). The flow is:
request upload url
upload to url with PUT request, and content type headers set
call complete url, which is returned from the first request (See “Completing an upload” section)
What the documentation means is that no extra steps are required for the non-multipart upload, in contrast to the multipart upload.
On the right hand side of this documentation, there are example requests and responses.
If you are getting errors, you should share them here to understand the situation better.
@mmoshev side note, fwiw, I regularly upload files >1gb using the non-multipart REST API option. Now that you mention a 500mb limit I remember it in the documentation, but for whatever reason, it hasn’t been a problem so far. Maybe AWS S3 has evolved?
“The file must be an image”. Perhaps filename=cg was an illustration, but is it really an image?
If it was the real parameter you passed, I think it should be filename=cg.png, containing the extension.
please can you provide YourPostDataAsJsonData JSON information. Im trying to upload a image version to an asset using Artist, description, Project ID, Task information of mine. Im executing this in postman, so I believe I need to use json information under body. what is idOfYourTargetVersion? is it ID of the asset to which image version being uploaded? Thank you in advance.