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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drumm’s picture

Oh 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.

Steven’s picture

Well, 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.

Bèr Kessels’s picture

I add a +1 for anything that removes complexity from the upload module. So I +1 this change.

Dries’s picture

Removing 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.

drumm’s picture

This 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.

drumm’s picture

FileSize
3.94 KB
Dries’s picture

I'll wait back some test report(s) then, or I'll test it myself as time permits.

drumm’s picture

FileSize
4.75 KB

Forgot the update.php chunk.

Robin Monks’s picture

Tested to work on HEAD.

+1 to anything that improves on User Uploading.

Robin

drumm’s picture

FileSize
6.57 KB

I synced this patch with HEAD, added missing punctuation to existing error messages, and tested. This should be ready to commit.

Dries’s picture

Status: Needs review » Fixed

Committed to HEAD.

drumm’s picture

"2005-05-22" => "update_141"

Shouldn't that be 2005-07-22?

Anonymous’s picture

drumm’s picture

Version: » 4.6.0
Status: Fixed » Closed (fixed)