5
Question
What checks belong in a secure image-upload endpoint?
I am adding screenshots to community posts. The browser provides a MIME type, but I know that value can be forged.
Current checks
- 4 MB maximum
- PNG, JPEG, WebP, or GIF
- Random generated filename
What should happen before the file reaches object storage?