Get a pre-signed upload URL
Generate a pre-signed URL for direct upload to R2. The client can PUT the file to the returned URL.
Authorization
Bearer AuthorizationBearer <token>
API key (rlay_live_* or rlay_test_*)
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/media/presign" \ -H "Content-Type: application/json" \ -d '{ "filename": "string", "content_type": "string" }'{ "upload_url": "http://example.com", "url": "http://example.com", "expires_in": 0}{ "error": { "code": "string", "message": "string", "details": { "property1": null, "property2": null } }}Found something wrong? Help us improve this page.