Problem/Motivation
Issue #3590178 fixed the mismatched Drupal.t() placeholder in the client-side max file size validation (s3fs_cors.js, max_size()), so the error no longer renders raw <em> markup. The message still only reports the limit in MB though, so a 5 GB limit reads "Max size allowed is: 5120 MB", which is hard to read.
Proposed resolution
Format the byte limit into the largest sensible unit (bytes/KB/MB/GB/TB) so the message reads "Max size allowed is: 5 GB" (or "10 MB", and so on), consistent with how core's ByteSizeMarkup presents sizes. See the attached merge request.
Remaining tasks
Review and merge the MR.
User interface changes
The max file size validation error now shows human-readable units (for example 5 GB) instead of a raw MB number.
API changes
None.
Data model changes
None.
Issue fork s3fs_cors-3593512
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
heddnThanks for the contribution.