Hello,
I have a problem in user pictures. I have set "Picture maximum file size" in user picture is 1000KB. so I thought that user can only upload their pictures up to 1MB but now when I uploaded more than 2 MB photo in my user picture (User was not admin) then also it was uploaded. drupal has not given me any validation for maximum picture upload size.
Then i have go through user.module and file.inc for finding what's happening, And I wonder that in user_validate_picture() function of user.module it is doing KB to Bytes and in file_validate_size() function from file.inc it is comparing file size of image in KB.
So In my case, drupal is comparing size of user picture with KB to Bytes, so my image is not validated properly?
So is there any way to validate this or i have to add it manually or is it Core Hack?
Please advice me.
Thanks,
Vijay
Comments
I found in file.inc that if
I found in file.inc that if I comment out clearstatcache(); line from file_validate_image_resolution() function then it is working.
Can any one has solution what i have to do? any why clearstatcache() is returning wrong value?
Thanks in advance.
Thanks,
Vijay Thummar