To upload a file to our API, you must meet the following criteria:
There are several ways to add files:
The full workflow to upload files using HTTP POST is as follows:
There are multiple config settings that can be passed to the upload/id method:
curl -X POST https://example.medialab.app/upload/id \
-F 'folder_id=101' \
-H 'Authorization: [Bearer|Private-Token] [TOKEN_GOES_HERE]'
{
'ulid': 'string',
'expires': 'int',
'expires_in': 'int',
'url_upload_direct': 'string',
'api': {
'rel': 'string',
'upload': 'string',
'finish': 'string'
}
}
curl -X POST https://upload.medialab.app/upload/file \
-F 'file=@MyFile.mp4' \
-F 'folder_id=101' \
-F 'title=Video.mp4'
Since we utilize a hybrid cloud infrastructure, it is always necessary to register an upload first and use the provided upload URL. This is because the upload URL will point to a different domain than the tenant's API domain and may change over time. It is therefore not possible to upload a file using a single call, the upload ID is a required first step.
If you are utilizing MediaLab as API back-end for your website, you can integrate a direct upload to MediaLab from your website. If you are looking to quickly upload files from Linux servers or NAS devices, it's also possible to use simple Bash scripts. here on GitHub.