Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On /admin/config/media/file-settings, Maximum Upload Size description says "Enter a value like "512" (bytes), "80 KB" (kilobytes) or "50 MB" (megabytes) in order to restrict the allowed file size."
So I tried entering in 1 MB or 1 KB, but it saves it as 1 byte.
Comment | File | Size | Author |
---|---|---|---|
#6 | file_entity-file-size-suffix-2894662-12167605.patch | 439 bytes | awaiskazimi |
Comments
Comment #2
cilefen CreditAttribution: cilefen commentedCuriously I can't reproduce this on a reference development site. "MB" and "KB" work, both in terms of saving the settings form (Do you literally mean /admin/config/media/file-settings? There is no setting there but it's on the file field configuration—I'm assuming that one), and in actual use, i.e. validating.
Comment #3
Jody LynnAh, thanks. This is coming from file_entiy module not core.
Comment #4
Jody LynnI think it is because file_entity.schema.yml specifies max_filesize type to be integer and it should be string.
Comment #5
cilefen CreditAttribution: cilefen commentedSounds likely.
Comment #6
awaiskazimi CreditAttribution: awaiskazimi as a volunteer commentedI have just developed a small patch to fix the issue.
Comment #8
joseph.olstadI've pushed this into the dev branch. With that said, would a hook_update be needed to fix this for existing installations?
The fix seems like it will fix new installations but what about existing ones?
Comment #9
joseph.olstadIncluded in rc2