5. To upload a file to media repository, firstly we need to send a post request to https://api.yaas.io/hybris/media/v2/files to get the upload link and commit link. PAY ATTENTION that for the Authorization part, the token should be started with "Bearer". The body indicates that the type of the file that you want to upload.
Then you will get the upload link and the commit link as response. The upload link is used to upload the file. After that the file is temporally stored in media repository. You need to send a request to the commit link to make the uploading finalized.
6. Send a put request to the upload link to upload the file.
7. Send a post request to the commit link to commit the file. Then you will get the id and link of the media file.
8. You can get the real download link of the file by sending a get request to the link.