Nirmos
Media

Create Media Upload

Create Media Upload — Nirmos Control Plane REST API.

POST
/v1/media/uploads/presign

Authorization

better-auth.session_token<token>

Production cookie uses __Secure- prefix.

In: cookie

Request Body

application/json

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/media/uploads/presign" \  -H "Content-Type: application/json" \  -d '{    "filename": "string",    "contentType": "image/png",    "sizeBytes": 1  }'
{  "data": {    "assetId": "string",    "uploadUrl": "string",    "method": "POST",    "fields": {      "property1": "string",      "property2": "string"    },    "expiresAt": "string"  },  "requestId": "string"}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "details": null,    "requestId": "string"  }}