Gallery images upload despite getting an error
Environment
Website
Describe the bug
If you forget to upload an image to your project's gallery page. Any unsaved uploads will upload and the upload that has no image doesn't upload. When you update that upload to have an image and hit "Save", you'll end up uploading the same images again.
Steps To Reproduce
- Go to your project's gallery page.
- Add a gallery entry with an image.
- Add another gallery entry without an image.
- Hit "Save".
- Get an error about one of your gallery entries not having an image.
- Update the image-less gallery entry to have an image.
- Hit "Save" again.
- You end up with duplicate gallery entries.
Expected behavior
In the event that you forget to add an image to a gallery entry, none of the unsaved gallery entries should upload until all unsaved entries have an image.
Additional context
No response
Extra Context:
https://modrinth.com/mod/arch-ex/gallery
I think the best solution here would probably just to be only allowing one gallery image to be saved at a time, imo.
Fixed in #826