To upload a file to our API, you must meet the following criteria:
A file can be uploaded using a single POST call to the /api/upload/file endpoint. You will need to provide a valid target folder as parameter, and optionally a custom title for the file.
Example with cURL:
curl -X POST https://example.medialab.co/upload/file \ -F "file=@MyFile.txt" \ -F "folder_id=101" \ -F "title=Video.mp4" \ -H "Authorization: [Bearer|Private-Token] [TOKEN_GOES_HERE]" \
If you are uploading multiple files, we recommend a slightly different workflow by first registering a new upload id. The files can then be uploaded the usual way but by providing the upload id for each file, you let us know these files belong together. During the upload process, the upload will be visible in the "Active uploads" tab in our Workflow Manager for administrators. When all files have been uploaded, you can mark the upload id as finished, at which point we will trigger one event to inform the online users of the upload.
Reasons to upload in a batch vs single files:
The workflow to upload in a batch: