Skip to content

Project/Group/Topic avatar: Add JS check for size

Sascha Eggenberger requested to merge avatar-add-js-check-for-size into master

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
project_before project_after
group_before group_after
admin_group_before admin_group_after
admin_topic_before admin_topic_after
Demo
inline-validation

How to set up and validate locally

  1. Open Project Settings
  2. Add Project avatar > 200 KB
  3. Before: No JS message, when hitting Save there will be a broken image shown
  4. Now: Instant message that image file size is too big, upload not possible

Test URLs:

Related to #474921 (closed)

Closing #28484 (closed)

Edited by Sascha Eggenberger

Merge request reports

Loading