I am using Drupal 8.3.5 and Lightning 8.x-2.16. I am not sure if this is only a Lightning issue. When I upload an image in an image field that exceeds the max file size. The user will see the alert/warning: The file is <em class="placeholder">826.11 KB</em> exceeding the maximum file size of <em class="placeholder">25 KB</em>. I would like to remove <em class="placeholder"></em> To reproduce this I installed a fresh Drupal Lightning site. Added a plain image field to the Page content type and set Maximum upload size to 80 KB. Then try to upload an image that is over that file size. There are no other custom modules.

Comments

leisurman created an issue. See original summary.

phenaproxima’s picture

Project: Lightning » Lightning Media
vj’s picture

Status: Active » Needs review
StatusFileSize
new502 bytes
dinesh18’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new8.58 KB
new8.93 KB

Similar Issue : https://www.drupal.org/project/lightning_media/issues/3006160.

I have tested the above patch and it solved the issue.
PFA screenshot.

phenaproxima’s picture

Crediting myself because I'm adding a bit of test coverage before committing :)

  • phenaproxima committed 9f12d0c on 8.x-3.x
    Issue #2923691 by Vj, Dinesh18, phenaproxima: image upload warning file...

  • phenaproxima committed d62fbae on 8.x-2.x
    Issue #2923691 by Vj, Dinesh18, phenaproxima: image upload warning file...
phenaproxima’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -image upload

Committed to 8.x-3.x and cherry-picked to 8.x-2.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.