Closed (works as designed)
Project:
Drupal core
Version:
7.16
Component:
image system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Nov 2012 at 13:19 UTC
Updated:
7 Nov 2012 at 06:19 UTC
I have several image and file fields in a D7.16 installation. The PHP file upload limit is 64MB, and files up to this limit are stored without any problem.
When I set a limit to "Maximum upload size", for example "1 MB" or "450 KB", this limit is ignored. I still can upload much bigger images and files, without any warning. This happens to all file and image fields in the installation. Tested on another server and D7.16 installations as well: same behaviour.
Comments
Comment #1
Tor Arne Thune commentedAre you uploading the files as user 1? This user is exempt from file size validation. I've burned myself on this in the past.
Comment #2
jurveen commentedThank you! Yes, I was logged in as user 1. I've tested file uploads with a regular admin account, and the file limits work as expected. Thank you for helping me out.
By the way, is this documented? Couldn't find anything in the Drupal forums.
Comment #3
monish_deb commentedThe validation was performed under includes/file.inc(function:file_validate_size) where condition has been purposely set for regular user (not 1).