Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 302508

Filename is not shown in the maximum allowed file size error message (w/o using the file_validate_size upload validator)

$
0
0

Problem/Motivation

When uploading multiple files in a file managed field and one or more files exceed the (environment's) upload limit (without using the file_validate_size upload validator), the file name(s) are not shown.

Proposed resolution

The problem is the use of SplFileInfo->getFilename() for the error messages, which is empty. SplFileInfo->getClientOriginalName() should be used, like it is later for the file entity values array.

Remaining tasks

This issue is not targeting the file_validate_size upload validator, which seem to have the same problem and need to be addressed in another issue.

User interface changes

The error message will change from
The file could not be saved because it exceeds 2 MB, the maximum allowed size for uploads.
to
The file BILL FAY - BE NOT SO FEARFUL.mp3 could not be saved because it exceeds 2 MB, the maximum allowed size for uploads.

API changes

None.

Data model changes

None.


Viewing all articles
Browse latest Browse all 302508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>