Upload (Optimizer)
As the name suggests, file upload are a core part of Mediacloud — the very reason Mediacloud exists is so you can have secure file uploaded to our cloud server. On this page, we'll dive into the different file upload endpoints you can use to manage media programmatically. We'll look at how to upload media.
POST/api/media/upload
Upload Media (Optimizer)
This endpoint allows you to upload a single file to mediacloud cloud server securely
Request
POST
/api/media/uploadcurl -X POST \
-H "Authorization: Bearer ${MEDIA_CLOUD_API_KEY}" \
-H "Content-Type: multipart/form-data" \
-F "media[]=@/path/to/your/file" \
-F "optimize=true" \
https://mediacloud.ng/api/media/upload
Response
{
"mediaUrls": [
"https://mediacloud.ng/media/bWVkaWEvaW1hZ2VzL29yaWdpbmFsL2pNTXBqOVczakNjTHEycUlXRlQ1ZjIxSVhUYjlHZGt4MmQ2RnZ1UGYucG5n.png"
]
}