offspot / imager-service

Create Kiwix Hotspot microSD cards online
https://imager.kiwix.org/
GNU General Public License v3.0
10 stars 6 forks source link

Branding returns error eventhough file size is correct #358

Closed Popolechien closed 5 months ago

Popolechien commented 5 months ago

I created a configuration, selected an image (151 kB) and then hit Update config. Then moved to the content tab, selected some content then updated again. I get an error message (Your config has errors and can not be saved. Please fix them and retry.) telling me that my branding image is too large (over 1.03MB).

I am still able to place an order but haven't checked yet if the image will be included.

rgaudin commented 5 months ago

I cannot reproduce following those steps ; I suppose it's not exactly how it hapened. Care to share the source image. Looking at it, it's probably a JPEG that we converted to PNG… and JPEG to PNG usually increases size so there might be something there.

Popolechien commented 5 months ago

_4f641df5-0c20-4281-9287-0d6d5a5a8ede I tried again with this jpeg image and another config, same result.

  1. create config, input name, update
  2. Go to branding, add image, update
  3. Go to content, add content, update -> error

Except that now after step 2 I get KeyError at /configurations/1012

image

rgaudin commented 5 months ago

That error message is unrelated and was due to a new push that I've fixed. We can disregard that screenshot.

The issue is valid though and as I expected is due to JPEG to PNG conversion.

rgaudin commented 5 months ago

Fixed in 082eff1