Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align docs with v1.11 spec #619

Open
Natureshadow opened this issue Sep 14, 2024 · 3 comments
Open

Align docs with v1.11 spec #619

Natureshadow opened this issue Sep 14, 2024 · 3 comments

Comments

@Natureshadow
Copy link

The v1.11 spec introduced the stable endpoints for authenticated media, effectively moving /_matrix/media/.* to /_matrix/(client|federation)/v1/media/.*.

The docs should be aligned with that.

I did not do this myself as a PR because I am not yet entirely sure what the correct patterns are.

@ArshamTeymouri
Copy link

ArshamTeymouri commented Oct 9, 2024

@Natureshadow after upgrading our synapse server to v.115.0 we're facing similar issues fetching images from matrix.org server:

time="2024-10-09 20:52:48.468 Z" level=error msg="Unexpected error locating media: unable to read suitable block from PEM file" allowRedirect=true allowRemote=true authServerName="" authUserId="" contentLength=0 contentType="" filename="" host=xxxx mediaId=cFVNiHPoEulNQzYZkHiqyfUG method=GET queryString="allow_redirect=true" remoteAddr="10.24.4.29:55132" requestId=REQ-728 resource=/_matrix/media/v3/download/matrix.org/cFVNiHPoEulNQzYZkHiqyfUG server=matrix.org userAgent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
time="2024-10-09 20:52:48.468 Z" level=info msg="Replying with result: *_responses.ErrorResponse &{Code:M_UNKNOWN Message:Unexpected Error InternalCode:M_UNKNOWN}" contentLength=0 contentType="" host=xxxx method=GET queryString="allow_redirect=true" remoteAddr="10.24.4.29:55132" requestId=REQ-728 resource=/_matrix/media/v3/download/matrix.org/cFVNiHPoEulNQzYZkHiqyfUG userAgent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"

I have already tried adding the signing keys as documented here but the issue still persist. Were you able to solve this problem?

@Natureshadow
Copy link
Author

Natureshadow commented Oct 9, 2024 via email

@leafee98
Copy link

leafee98 commented Oct 19, 2024

/_matrix/client/v1/media/config
/_matrix/client/v1/media/download/{serverName}/{mediaId}
/_matrix/client/v1/media/download/{serverName}/{mediaId}/{fileName}
/_matrix/client/v1/media/preview_url
/_matrix/client/v1/media/thumbnail/{serverName}/{mediaId}
/_matrix/media/v1/create
/_matrix/media/v3/config
/_matrix/media/v3/download/{serverName}/{mediaId}
/_matrix/media/v3/download/{serverName}/{mediaId}/{fileName}
/_matrix/media/v3/preview_url
/_matrix/media/v3/thumbnail/{serverName}/{mediaId}
/_matrix/media/v3/upload
/_matrix/media/v3/upload/{serverName}/{mediaId}

/_matrix/federation/v1/media/download/{mediaId}
/_matrix/federation/v1/media/thumbnail/{mediaId}

Using the following javascript and run on https://spec.matrix.org/v1.12/client-server-api/ and https://spec.matrix.org/v1.12/server-server-api/ , and filter the key word media, I got the above apis.

result = "";
endpoints = document.querySelectorAll(".endpoint");
for (let i = 0; i < endpoints.length; i++) {
  result += endpoints[i].textContent + "\n";
}
console.log(result);

So I think both /_matrix/media and /_matrix/(client|federation)/v1/media should be kept, at least for matrix v1.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants