No warning or error when upload fails

Created on 27 September 2023, about 1 year ago
Updated 15 October 2023, about 1 year ago

Problem/Motivation

When you use filebrowser to upload a file that is bigger than the on the server, it fails without a visible notice to the user.

Steps to reproduce

Upload a file that is bigger than the memory_limit in any filebrowser field

Proposed resolution

There should be a Drupal::message()->warning that tells the user that the file he tried to upload exceeds the maximum size limit.

Console message when file exceeds memory_limit

" An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /filebrowser/action/upload/ajax/4716?element_parents=u_file&_wrapper_format=drupal_ajax&ajax_form=1 StatusText: parsererror ResponseText: Warning: POST Content-Length of 284869112 bytes exceeds the limit of 104857600 bytes in Unknown on line 0 

...

 An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (100 MB) that this server supports.\n \u003C\/div\u003E\n\u003C\/div\u003E\n","settings":null}]"

Console message when file exceeds max post size

" An AJAX HTTP error occurred. HTTP Result Code: 503 Debugging information follows. Path: /filebrowser/action/upload/ajax/4716?element_parents=u_file&_wrapper_format=drupal_ajax&ajax_form=1 StatusText: Service Unavailable ResponseText: 413 Request Entity Too Large 413 Request Entity Too Large nginx "
πŸ’¬ Support request
Status

Closed: works as designed

Version

3.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States zaurav McLean, VA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024