Create a presigned upload
Reserves a workspace-scoped storage object and returns a short-lived direct-upload descriptor. Upload the file bytes straight to `uploadUrl` using the returned `method`, `headers`, and `fields`; the file never passes through Promptic. Defaults to private access.
Reserves a workspace-scoped storage object and returns a short-lived direct-upload descriptor. Upload the file bytes straight to uploadUrl using the returned method, headers, and fields; the file never passes through Promptic. Defaults to private access.
Authorization
BearerApiKey AuthorizationBearer <token>
API key from workspace settings
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://loading/api/v1/storage-objects/presign" \ -H "Content-Type: application/json" \ -d '{ "folder": "string", "filename": "string", "contentType": "string", "access": "public" }'{
"storageObjectId": "7f5af0cf-fc95-42d7-a16f-f40e471a1b60",
"access": "public",
"strategy": "url",
"provider": "s3",
"uploadUrl": "string",
"finalUrl": "string",
"method": "PUT",
"headers": {
"property1": "string",
"property2": "string"
},
"fields": {
"property1": "string",
"property2": "string"
},
"maxSizeBytes": 0,
"expiresAt": "string"
}{
"error": "string"
}{
"error": "string"
}{
"error": "string"
}