FILE.PREUPLOAD
POST
To validate and presign a file upload
Request
- application/json
Body
action stringrequired
Default value: file.preupload
The action
filename stringrequired
The filename with extension
content_type stringrequired
The content type
metadata object
Object of metadata
public_read boolean
Set to true to make the file public
new_name string
A new name for the file
options object
Additional options
profilephoto boolean
To set an image as a profile photo
variants array
list of variants for images
Responses
- 200
Preupload Response
- application/json
- Schema
- Example (from schema)
Schema
data object
info object
_key string
url string
filename string
filesize string
fileclass string
object_key string
info object
acl string
content_type string
image_variants object
presigned_data object
Presigned data
{
"data": {
"info": {
"_key": "string",
"url": "string",
"filename": "string",
"filesize": "string",
"fileclass": "string",
"object_key": "string",
"info": {},
"acl": "string",
"content_type": "string",
"image_variants": {}
},
"presigned_data": {}
}
}
Loading...