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

Large images giving 'Only image files are supported' error. #4389

Open
oracularhades opened this issue Jun 6, 2024 · 1 comment
Open

Large images giving 'Only image files are supported' error. #4389

oracularhades opened this issue Jun 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@oracularhades
Copy link
Contributor

oracularhades commented Jun 6, 2024

Putting this here to save someone the pain of investigating this javascript bullshit. This is not an issue that is worth and code changes.

Describe the bug
https://bsky.app/profile/thiccass.pikachu.zone/post/3kuaez7figc2k

(I made the absurdly large image [in bluesky context] of 51MB to test this)

When uploading a large image, the client will give a toast error message of 'Only image files are supported'. This is because the client is checking mimeType, however, if the image is too big, sometimes the mimeType won't even get returned (probably for reasonable browser performance issues), it is just a null/undefined value. Here is where the check is occurring:

Toast.show('Only image files are supported')

I tried removing the image mimeType check, to see if we could just rely on the file picker settings to guide the user. However, if the image is ridiculously large, it will crash the gallery image (seemingly >60MB).

This isn't worth anyone's time, but if it becomes an issue in the future, someone can refer to this when fixing it.

To Reproduce

Steps to reproduce the behavior:

  1. Make an absurd image. An easy way to make a 51MB image (or around that, depending on the encoding), is to go into preview > tools > adjust size and set width/height to something ridiculous like 4944w 4514h pixels.
  2. Attempt to upload the image in the composer.

Expected behavior

Image uploads normally.

Screenshots

Screenshot 2024-06-06 at 9 36 12 PM

Additional context

@oracularhades oracularhades added the bug Something isn't working label Jun 6, 2024
@mschwendener
Copy link

Can confirm. An easy solution would be to change the message to "Only image files up to ... MB are supported"

error_screenshot_5223

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants