Project/Group/Topic avatar: Add JS check for size
What does this MR do and why?
Project/Group/Topic avatar: Add JS check for size
Adds a JS check for the max file size so users get fast feedback and avoids a visual regression when a bigger sized avatar gets uploaded.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Before | After |
---|---|
Demo | |
How to set up and validate locally
- Open Project Settings
- Add Project avatar > 200 KB
- Before: No JS message, when hitting
Save
there will be a broken image shown - Now: Instant message that image file size is too big, upload not possible
Test URLs:
- Project settings: http://gdk.test:3000/flightjs/Flight/edit
- Group settings: http://gdk.test:3000/groups/flightjs/-/edit
- Admin group settings: http://gdk.test:3000/admin/groups/flightjs/edit
- Admin topic settings: http://gdk.test:3000/admin/topics/1/edit
Related to #474921 (closed)
Closing #28484 (closed)
Edited by Sascha Eggenberger