post https://api-dev.orbit.do/v5/storage/upload
Content Type Requirements
The contentType
field must be a valid MIME type that matches the file you intend to upload. This is crucial because:
- S3 Upload Match: The MIME type you specify here will be used to generate the pre-signed URL and must exactly match the
Content-Type
header when you upload the file to the returned URL - Common MIME Types:
- Images:
image/png
,image/jpeg
,image/gif
,image/webp
- Documents:
application/pdf
,application/msword
,text/plain
- Archives:
application/zip
,application/x-rar-compressed
- Images:
- Upload Process: After receiving the upload URL, make a
PUT
request to that URL with your file as the request body and the sameContent-Type
header value
Example Flow:
- Request upload URL with
"contentType": "image/png"
- Receive pre-signed URL in response
- Upload file using
PUT
method withContent-Type: image/png
header