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.
- Under the file/add menu item, files may be uploaded to the max upload size of the server.
- With fields, each field may be configured to have its own max size.
- In instances where the module is run on a shared server it may not be possible/may be impractical to alter the max upload limit.
- It may be useful to allow file_entity to specify its own max upload size for files added through the file/add menu
Comment | File | Size | Author |
---|---|---|---|
#12 | add-max-filesize-configuration-option-2045605-12.patch | 3.21 KB | Devin Carlson |
#10 | file_entity-code-2045605-10.patch | 2.06 KB | tobiasb |
#7 | file_entity.code_.2045605-7.patch | 1.96 KB | tobiasb |
#4 | file_entity.code_.2045605-4.patch | 2.95 KB | tobiasb |
#1 | 2045605-1-file_entity_upload_limit.patch | 2.81 KB | adammalone |
Comments
Comment #1
adammaloneattaching first prospective POC patch
Comment #2
adammaloneComment #3
aaron CreditAttribution: aaron commentedAfter testing, even though the message below the add file interface reads with the new limit, I am still able to upload larger files.
Comment #4
tobiasb* removed whitespace
The filesize validation is skipped for user 1. Therefore use a different user to test the patch.
Comment #5
aaron CreditAttribution: aaron commentedThis works for me.
Comment #6
Dave ReidThis should be altered into admin/config/media/file-system instead of adding a new page.
Comment #7
tobiasbAdded the settings to file_entity_form_system_file_system_settings_alter().
Comment #8
aaron CreditAttribution: aaron commentedThis works as well.
Comment #9
Dave ReidLikely need to be re-rolled for #2066459: Move settings to our own page at admin/config/media/file-settings
Comment #10
tobiasbMoved the settings to the new form.
Comment #11
aaron CreditAttribution: aaron commentedWorks as well.
Comment #12
Devin Carlson CreditAttribution: Devin Carlson commentedI've only found a few issues with #10; it looks good otherwise.
Now that File entity has its own administration settings form setting a weight is unnecessary.
If the supplied
$options['max_filesize']
pass theif{}
statement then theelseif{}
will never trigger, allowing other modules to bypass the user defined file size limit.The new
file_entity_max_filesize
variable should also be added to the list of variables to delete during uninstall.Comment #13
Devin Carlson CreditAttribution: Devin Carlson commented#12: add-max-filesize-configuration-option-2045605-12.patch queued for re-testing.
Comment #14
Devin Carlson CreditAttribution: Devin Carlson commentedCommitted #12 to File entity 7.x-2.x.
http://drupalcode.org/project/file_entity.git/commit/af6c714