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:

  1. Using the JWT provided, the media server gets the access status of the application for the media object.
  2. If the application has editor or user access it is allowed to upload the file, otherwise the Media Server returns an unauthorized status.
  3. The Media Server updates the corresponding data in the media table with the file encoded in bytea format.