- 🇮🇳India mohit_aghera Rajkot
I believe this issue doesn't exist anymore.
Reasons:
Right now we are displaying file upload help text like following image.
The value 8 MB is coming from negotiation between what we defined in field setting and
post_max_size & upload_max_filesize
php.ini variables.
Refer https://git.drupalcode.org/project/drupal/-/blob/11.x/core/lib/Drupal/Co...Once we have the minimum file size upload value from above php.ini variables, we compare it with the value defined in field setting's file upload size setting.
See https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/file/... for validator callback and for https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/file/... actual callback implementation.Here we decide what maximum file size should be allowed for users to upload and we set in validation constraint.
// Cap the upload size according to the PHP limit. $maxFilesize = Bytes::toNumber(Environment::getUploadMaxSize()); if (!empty($settings['max_filesize'])) { $maxFilesize = min($maxFilesize, Bytes::toNumber($settings['max_filesize'])); }
So essentially, user will always have the minimum possible file upload size and it will be calculated based on our settings and php.ini
With this there is no need to show different message to users as it might be too technical for them.
Feel free to reopen the issues if you notice further issues.