Upload (Multiple)

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 (Multiple)

This endpoint allows you to upload a multiple files to mediacloud cloud server securely

Request

POST
/api/media/upload
curl -G https://mediacloud.ng/api/media \
    -H "Authorization: Bearer ${token}" \
    -F "media[]=@/path/to/first/file1.jpg"
    -F "media[]=@/path/to/first/file2.jpg"

Response

{
    "mediaUrls": [
        "https://mediacloud.ng/media/bWVkaWEvaW1hZ2VzL29yaWdpbmFsL2pNTXBqOVczakNjTHEycUlXRlQ1ZjIxSVhUYjlHZGt4MmQ2RnZ1UGYucG5n.png",
        "https://mediacloud.ng/media/bWVkaWEvaW1hZ2VzL29yaWdpbmFsL2pNTXBqOVczakNjTHEycUlXRlQ1ZjIxSVhUYjlHZGt4MmQ2RnZ1RTYUIEUO.png",
    ]
}

Was this page helpful?