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.
I can not download file more 2 Mb but upload_max_filesize 32M (php.ini)
And does not get messages about it.
How to increase the limit on file upload?
Comment | File | Size | Author |
---|---|---|---|
#20 | reroll-remove-hardcoded-sizes.patch | 749 bytes | slashrsm |
#19 | reroll-remove-hardcoded-sizes.patch | 743 bytes | -enzo- |
#3 | 1230632-3.remove-hardcoded-sizes.patch | 854 bytes | ksenzee |
Comments
Comment #1
willvincent CreditAttribution: willvincent commentedWhat is the post_max_size value set to in php.ini? Both it and the upload max filesize typically need to be large enough to allow bigger file uploads, I would assume that also applies with this upload method.
Comment #2
willvincent CreditAttribution: willvincent commentedActually, now that I look at the plupload js library docs, this is probably a setting that needs to be adjusted for it, rather than for php..
These two items jump out as relevant to me:
Comment #3
ksenzeeIt looks like there's a hard-coded 10mb file size limit in plupload.module. I don't know if that was causing the problem in the original post, but it certainly isn't helping. Here's a patch that implements site-specific limits for max_file_size and chunk_size.
Comment #4
agentrickardSeems to be related to #1356760: Plupload: Forward medias filesize limit value to plupload as well.
Comment #5
agentrickardI think this is ready to go in, with making it configurable as a follow-up.
One question, in reading the PHP docs: do we need to account for ini.memory_limit when calculating these values? It would seem proper. http://www.php.net/manual/en/ini.core.php#ini.post-max-size
Comment #6
ksenzeeI can't tell from the PHP docs whether we should take memory_limit into account or not. On the one hand, it sounds like something the sysadmin should be managing. On the other hand, if the chunk size is bigger than memory_limit things will explode quite prettily.
Comment #7
agentrickardYeah, so I would think we should cap chunk size. Oddly, however,
file_upload_max_size()
seems to ignore that, too.Do we know why core doesn't use memory_limit? That would answer the question.
Comment #8
rickvug CreditAttribution: rickvug commentedAlso see #1060448: Support for max upload size and resize parameters which is solving the same problem but adds configuration. Personally I'd favor of getting this patch in quickly and then moving on to making the values configurable in the other issue.
Comment #9
agentrickardRTBC then.
Comment #10
rickvug CreditAttribution: rickvug commented@agentrickard Yup, I'd say so. I just tested with a 200MB file without problem.
Comment #11
willvincent CreditAttribution: willvincent commentedRe #8: I think contrary to the other request for having this be a configurable value this is the right way to do it.. These settings should ideally be managed by the sys admin in my opinion. The only instance I can think of that that wouldn't be the case would be in the instance of shared hosting, but then the settings are likely limited to too small an amount anyway, so config to try and change those settings wouldn't be useful anyway.
I think the patch as provided in #3 is probably the best solution here.
Comment #12
agentrickard@willvincent
Which is why the two issues are decoupled. That debate needs to happen in the other issue.
Comment #13
slashrsm CreditAttribution: slashrsm commentedCommited to 7.x-1.x: http://drupalcode.org/project/plupload.git/commit/6605872
Thanks!
Comment #14
rickvug CreditAttribution: rickvug commented@slashrsm Excellent news! I noticed that a number of other helpful patches have gone in recently. Any chance that another beta release is around the corner? It always feels good to remove patches from make files. :)
Comment #15
slashrsm CreditAttribution: slashrsm commentedLatest release (beta4) includes most of the patches I commited last weekend. As soon some other patches are commited I plan to release another release. If it's going to be another beta or rc depends on number of new issues that appear.
Comment #16
rickvug CreditAttribution: rickvug commentedI didn't realize that there was already a new release made on the 18th. Thanks!
Comment #17
atlea CreditAttribution: atlea commentedHi,
I agree with this patch - but just note that if php upload_max_filesize is less than 10mb people using this module will now have a reduction in max file size after this patch. 10mb would have been no problem earlier, even with upload_max_filesize set to 2mb, as it was chunked down to 1mb.
This is only really a problem using the buildt in uploader, though, as modules implementing this field element can set their own limits. E.g. in FileField Sources Plupload the limit set on the field instance - allowing one to upload files regardless of php limits.
That is another reason for not making this a configurable setting, as if could potentially confuse the user if they set 50mb in Plupload settings, but the module using the field has its own settings.
a.
Comment #19
-enzo- CreditAttribution: -enzo- commentedI just clone the branch 7.x-1.x and I don't see the change.
i did a reroll of patch contributed by ksenzee for version 7.x-1.x
Comment #20
slashrsm CreditAttribution: slashrsm commentedHm... that's strange. How did this happen... Anyway, thank you for this.
I think we need to add 'b' at the end. See patch....
Comment #21
slashrsm CreditAttribution: slashrsm commentedCommitted.
Comment #24
bwaindwain CreditAttribution: bwaindwain as a volunteer commentedTo anyone interested, this reverts the chunk_size setting done at previously at https://www.drupal.org/node/1461884. I don't understand why. I think 1mb is a more logical choice.