Skip to content

Sharing multiple images from external app doesn't apply the correct mime tag #4279

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

Closed
bblacher opened this issue Feb 19, 2025 · 5 comments · Fixed by #4715
Closed

Sharing multiple images from external app doesn't apply the correct mime tag #4279

bblacher opened this issue Feb 19, 2025 · 5 comments · Fixed by #4715
Labels
A-Share O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@bblacher
Copy link

bblacher commented Feb 19, 2025

Steps to reproduce

  1. Use some external app (in my case LineageOS gallery)
  2. Select and share multiple images using Element X
  3. Observe those images not getting bridged using mautrix-signal with an error stating ⚠️ Your message was not bridged: unsupported media type (image/* in m.image)

Outcome

What did you expect?

The images should get bridged

What happened instead?

The images didn't get bridged because Element X seems to apply the wrong mime tags

Your phone model

Google Pixel 8 Pro

Operating system version

CalyxOS 6.4.0 (Android 15)

Application version and app store

Element X 2025.02 from F-Droid

Homeserver

Synapse v1.124.0

Will you send logs?

No

Are you willing to provide a PR?

No

Additional Information

I reported this issue to mautrix-signal at first, see mautrix/signal#587 but it seems like this is a bug with Element X. I also tried sharing from Aves (alternative gallery app) and got the same result. If this is an issue with LineageOS gallery AND Aves please close this issue and I will report it at the respective repos. Thanks!

@bblacher bblacher added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Feb 19, 2025
@szimszon
Copy link

szimszon commented Mar 5, 2025

Same here with Nothing Gallery ....

@szimszon
Copy link

szimszon commented Mar 5, 2025

ElementX: 25.03.0 (202503002) from F-Droid

@retarepo
Copy link

I guess it's the same problem as #3848, for me it occurs with single images as well, if they are shared from another app (e.g. Jerboa). Currently this issue is blocking me from switching from legacy Element.

@anytimesoon
Copy link

I get the same issue. It happens when sharing directly from an app. This issue is not present in legacy element, like retarepo said.

@jmartinesp
Copy link
Member

I was finally able to reproduce this. It seems like we take the mime type from the intent sent to our app instead of the files shared, so if you selected i.e. a png and a jpg file, instead of image/jpeg or image/png mime types we receive image/* since the actual type is mixed.

The fix would be to retrieve the mime type from the files themselves.

@jmartinesp jmartinesp added S-Minor Impairs non-critical functionality or suitable workarounds exist O-Occasional Affects or can be seen by some users regularly or most users rarely A-Share labels May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Share O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants