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

getUrlPreview issue #1881

Closed
MadonnaEssam opened this issue Sep 6, 2021 · 1 comment
Closed

getUrlPreview issue #1881

MadonnaEssam opened this issue Sep 6, 2021 · 1 comment

Comments

@MadonnaEssam
Copy link

I'm using matrix-js-SDK version "2.4.6" and vue-js

I'm trying to send file in chat using this code

const uploadResponse =Client.uploadContent(file).then(function (data) {
                    const matrixUrl = data;
                    console.log(matrixUrl);

                  Client.getUrlPreview(matrixUrl, Date.now()).then((response) => {
                        Client.sendMessage(roomId, {
                            msgtype: "m.file",
                            body: response["og:title"],
                            url: matrixUrl,
                        });
                    })

every time I got 404 not found
https://xxxx/_matrix/media/r0/preview_url?url=mxc%3A%2F%2Fensofiaop.cv19.app%2FbqCPnnyMSXSdCDxYwZgHgwBa&ts=1630957741501&access_token=MDAyMGxvYxxxxxxxx
404 (Not Found)
How can I fix it?

@t3chguy
Copy link
Member

t3chguy commented Aug 10, 2023

You'd need to check server logs and figure out why its returning a 404. Not a client issue.

@t3chguy t3chguy closed this as completed Aug 10, 2023
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

2 participants