Faithful-Resource-Pack / API

A public API for Faithful Resource Pack textures, add-ons and more
https://api.faithfulpack.net
GNU Affero General Public License v3.0
0 stars 0 forks source link

[Bug] Add-on header images aren't always converted to JPEG properly. #35

Open 3vorp opened 9 months ago

3vorp commented 9 months ago

What happened?

When adding a header image, the API doesn't validate that it's a JPG before writing, leading to possible duplication of header images and incorrect paths.

To reproduce

  1. Add a PNG-encoded header image to an add-on on the webapp.
  2. Save.
  3. Look at the corresponding folder on the DB for storing the header images.

Screenshot(s)

image

Notes

Would be ideal to fix the extension on the server end rather than forcing the user to do it.

Pomi108 commented 9 months ago

Is the web app actually supposed to convert images to JPG? I thought it accepted both formats and used them as they are

Edit: Oops i didn't realise this is the API repo. Whatever