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.
Would be really nice to be able to limit file size of an uploaded file (or even set limits role-driven) per file, e.g. one file cannot be bigger than 1MB. And size limits per node if file field is used in multiple values mode, e.g. size of all uploaded files for 1 node may not be bigger than 5MB.
Comments
Comment #1
jpetso CreditAttribution: jpetso commentedI read this issue as not being a duplicate of #150393, because that one is concerned with site-wide upload limits and this request wants per-field settings for upload limits. Therefore, valid issue, but certainly not critical.
Comment #2
dopry CreditAttribution: dopry commentedThis would be a super cool feature.... Lets try to get this into a 2.3 release
Comment #3
hillaryneaf CreditAttribution: hillaryneaf commentedThis is a much needed feature!
subscribing..
Comment #4
greg.harveyDone.
http://drupal.org/project/filefield_upload_limit
There is intention to submit this as a patch to filefield.module, but I haven't had time to write the patch yet. So for now you will have to use the module.
Comment #5
jpetso CreditAttribution: jpetso commentedI now extended FileField for Drupal 6 with per-file and per-node file size restrictions. That should probably satisfy most use cases, and those use cases that are not satisfied can be added by add-on modules that implement the new hook_filefield_filesize_restrictions(). (The only thing that is less flexible with this solution is the settings form that can't be altered, because I removed that alter hook in favor of file widget setting hooks. Might add it back if necessary, or perhaps CCK should offer such a hook. Anyways, that's secondary now.)
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #7
ipto CreditAttribution: ipto commentedI set 500K for file size limit, but file with size = 800K was uploaded successful. FileField version at jul 31