Upload a media file
To upload a file to the media server you will need the UUID of the media object associated with the file and your JWT. Make a POST request at:
http://127.0.0.1:3000/upload/${UUID} with cookie ‘jwt=${JWT}’
The file has to be provided as form-data with the name set to ‘uploaded_file’.
When you make this http request, the media server does the following:
- Using the JWT provided, the media server gets the access status of the application for the media object.
- If the application has editor or user access it is allowed to upload the file, otherwise the Media Server returns an unauthorized status.
- The Media Server updates the corresponding data in the media table with the file encoded in bytea format.