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.
Currently the upload module checks two max file sizes. First it checks a global option; if its too big it quits. Then it checks another max file size (or even sizes) related to the roles which a user is in.
We can remove the global option since the individual roles are checked.
Comment | File | Size | Author |
---|---|---|---|
#10 | upload.module_8.diff | 6.57 KB | drumm |
#8 | upload.module_7.diff | 4.75 KB | drumm |
#6 | upload.module_6.diff | 3.94 KB | drumm |
upload.module_5.diff | 4.01 KB | drumm | |
Comments
Comment #1
drummOh and this includes a refactoring which changes one undocumented function that did two things into two documented functions that do one thing each. Forgot about that part.
Comment #2
Steven CreditAttribution: Steven commentedWell, you're not entirely correct... upload module allows you to disable a limit by setting it to 0. Thus, you could either want per-role settings, or global settings. Or use the global setting for everyone, except have one role have a stricter limit.
So we need to decide whether these are valid use cases, or just unnecessary complexity.
Comment #3
Bèr Kessels CreditAttribution: Bèr Kessels commentedI add a +1 for anything that removes complexity from the upload module. So I +1 this change.
Comment #4
Dries CreditAttribution: Dries commentedRemoving the global check is OK if we remove the '0 is unlimited'-paradigm. A paradigm which, by the way, is developer-centric. I don't mind us removing it.
Comment #5
drummThis revised patch should make '0' or blank mean unlimited for the per user quota and file size limits. I have not tested it. It is not documented in the form items. Now might be a good time to look at the defualts for those. I still very short on time and probably won't be able to properly revisit this for a week or so. Got to get on a plane now.
Comment #6
drummComment #7
Dries CreditAttribution: Dries commentedI'll wait back some test report(s) then, or I'll test it myself as time permits.
Comment #8
drummForgot the update.php chunk.
Comment #9
Robin Monks CreditAttribution: Robin Monks commentedTested to work on HEAD.
+1 to anything that improves on User Uploading.
Robin
Comment #10
drummI synced this patch with HEAD, added missing punctuation to existing error messages, and tested. This should be ready to commit.
Comment #11
Dries CreditAttribution: Dries commentedCommitted to HEAD.
Comment #12
drumm"2005-05-22" => "update_141"
Shouldn't that be 2005-07-22?
Comment #13
(not verified) CreditAttribution: commentedComment #14
drumm