Quota problems
Jay Matwichuk - June 29, 2009 - 03:50
| Project: | Image Picker |
| Version: | 6.x-2.x-dev |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I like the upgrades to the module! I had already come to the opinion that this is the best image module for Drupal so far, after trying out pretty much all of them, and it's only getting better with these improvements!
However, I have found a problem. I set the quota to unlimited in the image picker settings, but when I try to create content, there is a message saying:
Your quota is 1 Meg and you have used 0 percent, or 0 b in 0 images
I then uploaded a picture that was 3 megs, to see what would happen, and I got this message:
Your quota is 1 Meg and you have used 322.32 percent, or 3.22 M in 1 images
So there is a problem somewhere in there with the quota situation!

#1
I also just noticed that when I go to upload a new image, I get the following error:
You have used all of your quota, please delete some files to make some room.Which makes sense, since I have gone over the displayed quota, though it doesn't make sense as I have an unlimited quota.
#2
You may or may not have found a bug ;-)
Can you tell me the following
What is the default quota as set in admin/settings/imagepicker?
Individual users can be set by admin in admin/settings/imagepicker > Images > Users
What is the quota for the user you were testing this as?
A user can go over quota once, that has to be because there is no way of knowing what size an uploaded image will be until it's arrived so I prevent them from doing any more
Please collect as much information as you can so that I can try to reproduce this, Thanks.
#3
The default quota in admin/settings/imagepicker is set as 'unlimited'. I went to admin/settings/imagepicker -> Images -> Users, but when I tried to search for my username, no user appeared. I am user 1 - there are no other users in the system, as I test new modules in a development environment - basically a clean Drupal installation.
Also, I was confused with the 'validation' tab - I keep getting this error:
file not found in database: Thumbs.dbI don't know how to fix it though. I cannot find any file named Thumbs.db - maybe adding a filepath for the files would make things more clear? Thank you for your help with these issues.
#4
Thanks for coming back so quickly.
I'll have a look at the quotas thing and see if I can replicate that. If a user has never uploaded any images they will not appear in the list as their folder under files/imagepicker will not yet exist.
Validation is really just for converting the old way of storing images, eg by name to the new way, by uid. If its a new install you don't need to worry about it.
There must be a Thumbs.db in the files dir somewhere, they usually turn up with dreamweaver or photoshop collections
I will tweak the validation code to just ignore such things.
#5
Just wanted to add that even though the default was set to unlimited, I was over my quota. I went to admin/settings/imagepicker -> Images -> Users as hutch suggested, and then for my user (user 1), it said unlimited. I then click on unlimited so I could see what the other options were, selected UNLIMITED again, and applied the change. Now my user is correctly detecting that I have an unlimited quota properly. You can also of course disable quotas, but that might not be ideal depending on each site's needs/operation.
#6
OK, this gives me some idea of where the bug might lie.
#7
Found the bug.
If anyone needs it fixed straightaway:
in 2.x-dev
line 2247 in imagepicker.module
$quota = ( isset($user->imagepicker_quota) ? $user->imagepicker_quota : variable_get('imagepicker_quota_default', 1));should be
$quota = ( isset($user->imagepicker_quota) ? $user->imagepicker_quota : variable_get('imagepicker_quota_default', 0));It will be in CVS soon, along with a bunch of other stuff
#8
Thanks for taking care of that so quickly mate!
#9
fixed in dev
#10
Automatically closed -- issue fixed for 2 weeks with no activity.