Message not catched when uploading an image with megapixels higher than the ones permitted


(Ismael Posada Trobo) #1

Hi guys,

Not sure if someone has reported this before, but just in case. I’ve tried to upload a picture creating a new topic and clicking on Upload button, with the following data:

  • size: 8MB
  • pixels: 97

Having Discourse configured with the following settings:

  • max_image_size_kb: 4096
  • max_attachment_size_kb: 4096
  • max_image_megapixels: 40

After a while, I got the following non-human readable error:
image

Increasing both the size and the megapixels it works, no errors. I’ve tried with version v2.1.6 and v2.2.0.beta5.

Maybe this message should be a bit more friendly?

Cheers,
trobiyo


(Jeff Atwood) #2

This looks like an error in the underlying ImageMagick C binaries, so my guess is it is specific to that image. This is extremely unlikely to be a Discourse bug based on what you posted.

Can you duplicate this on try.discourse.org? Where can I download the source image to test with?


(Ismael Posada Trobo) #3

Hi Jeff,

Please find below a link where to download the original image from onedrive (View original and then download it, to recover the original one):

I’ve tried in try.discourse.org and seems to work, but I dunno what are the settings set related to the size and the pixels.

Hope this helps!

Cheers
trobiyo