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

received pictures can't be displayed/downloaded #21

Open
DerTeufel opened this issue Sep 26, 2024 · 0 comments
Open

received pictures can't be displayed/downloaded #21

DerTeufel opened this issue Sep 26, 2024 · 0 comments

Comments

@DerTeufel
Copy link

DerTeufel commented Sep 26, 2024

I hope you can tell me the correct api to use, to be able to view received images.
Currently i am using:

viewLifecycleOwner.lifecycleScope.launch {
try {
val data = session.fileService().downloadFile(content
)
// Switch to Main thread to update UI
withContext(Dispatchers.Main) {
Glide.with(imageView.context)
.load(data)
.into(imageView)
}
} catch (failure: Throwable) {
Log.e("ImageLoader", "Failed to download image", failure)
}
}

with content being 'MessageWithAttachmentContent'.

On the sender device, the image gets shown properly, because this is found in cache.
On the receiver device, it ends up with this:
`09-25 18:55:17.988 22371 22371 V DefaultFileService: ## FileService downloadFile mxc://matrix.org/MgDMGLWWwdrupnxAaIlSBLbX

09-25 18:55:17.991 22371 22416 V FormattedJsonHttpLogger: --> GET https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/MgDMGLWWwdrupnxAaIlSBLbX

09-25 18:55:18.161 22371 22371 V DefaultContentDownloadStateTracker: ## DL Progress Error code:404

09-25 18:55:18.162 22371 22416 V FormattedJsonHttpLogger: <-- 404 Not Found https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/MgDMGLWWwdrupnxAaIlSBLbX (169ms, unknown-length body)

09-25 18:55:18.164 22371 22371 E ImageLoader: Failed to download image`

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

1 participant