Problem/Motivation
It would be useful if the maximum upload file size limit would be displayed on the content import page in the description of the file field, so users don't have to make guesses regarding the limit.
Steps to reproduce
Go to admin/content/import and see that there is no information regarding the maximum upload file size.
Proposed resolution
Display the maximum upload file size limit in the description of the file field.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | after.png | 118.17 KB | arunsahijpal |
| #10 | before.png | 112.18 KB | arunsahijpal |
Issue fork single_content_sync-3491624
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 #2
nginex commentedComment #3
anish.ir commentedComment #5
nginex commented@anish.ir you don't need all this code you provided
Just one line is the way to go
Comment #6
anish.ir commentedOkay, I'll do it.
Comment #7
anish.ir commentedHey @nginex,
I have tried implementing your suggestion but the funciton formatSize() is deprecated in Drupal 10.
I have also tried using :
Bytes::toHumanString(Environment::getUploadMaxSize())but it was also not working as expected to be.Please have a look and let me know, whether I need to revert the changes or not.
Comment #8
nginex commentedTry
See https://www.drupal.org/node/2999981
Comment #9
anish.ir commentedHey @nginex,
Thank you for the reference, I have updated the MR. Please have a look.
Comment #10
arunsahijpal commentedGood work @anish.ir,
I've tested the MR on my local and I assure that all the changes have been done and this is also working for Drupal 9.
Attaching ss for reference.
Hence moving it to RTBC.
Thanks,
Arun
Comment #11
nginex commentedComment #13
nginex commented