Description
Steps to reproduce
First of all thank you for the element-web. It is a great way to serve Matrix!
I have found the issue in the element web, preventing file exchange.
-
Where are you starting? What can you see?
Setup: The element was installed on ubuntu machine from the deb package and was served as a static page from/var/www/html/element
. In theconfig.json
it was pointed to the matrix web server. -
What do you click?
Upload any file to the matrix server. If it will be an image, the preview will not be shown. The download will result in 404 error as follows:
An error occurred while downloading this file
DownloadError: MatrixError: [404] Not found (https://matrix.example.com/_matrix/media/v3/download/xxxxx/xxxxxxxxxxxxxxxxxxxxxx?allow_redirect=true) -
More steps…
The problem happens, because the client tries to access files without authorization as it was before implementation of 3916 proposal.
There is a logic in element-web, which should handle this issue, however, it does not seems to work on web-client side.
I also have confirmed that matrix server can handle the requests properly:
# Results in 404 error
curl -G https://matrix.example.com/_matrix/media/v3/download/xxxxx/xxxxxxxxxxxxxxxxxxxxxx
# Will download encrypted file
curl -H "Authorization: Bearer yyyyyyyyyy" -G https://matrix.example.com/_matrix/media/v3/download/xxxxx/xxxxxxxxxxxxxxxxxxxxxx
It would be great to have the logic adding authenticating the request on the client side.
Outcome
What did you expect?
What happened instead?
Operating system
No response
Browser information
No response
URL for webapp
No response
Application version
No response
Homeserver
No response
Will you send logs?
Yes