Upload File into Media Storage
POST/medias/upload-file
If hosted is set to true then fileUrl is required. Else file is required. If adding a file, maximum allowed is 25 MB. For video files, the maximum allowed size is 500 MB.
Request
Version stringrequired
API Version
Available options
v3- multipart/form-data
- Body
- Example (auto)
Bodyrequired
filestring<binary>
hostedboolean
fileUrlstring
namestring
parentIdstring
{
"file": "string",
"hosted": true,
"fileUrl": "string",
"name": "string",
"parentId": "string"
}
Successful response
- application/json
- Schema
- Example (auto)
Schema
fileIdstringrequired
ID of the uploaded file
urlstringrequired
Google Cloud Storage URL of the uploaded file
{
"fileId": "file.pdf",
"url": "https://storage.googleapis.com/bucket-name/path/to/file.pdf"
}