Consider a situation when you need to create a resource that references a file (e.g: an image). The file needs to be uploaded before resource creation and after requested to get the credentials allowing you to upload to the storage service.
The steps are:
- call
GET
resources#new endpoint to get thepresigned_url
for file upload - upload the file using the
presigned_url
via aPUT
request - call
POST
resources#create endpoint to actually create the resource