Page 1 of 1
total size user uploads not working
Posted: 22 Jan 2015, 15:44
by Dutchpainter
Hi,
I use phocagallery version 3.2.8 on my site. I noticed that when users use the usermenu to upload files, the total size of used space by this user is calculated. If the uploads exceed this size, they cannot upload anymore.
If the users however use the gallery upload, located under the pictures in the usergalery, the max size is not used. And that way users can upload more than the max size which was set in the control panel.
Is there a way to make this work correct please? Or is it possible to make it impossible to use the userpanel in the galery?
Thank you in advance
Re: total size user uploads not working
Posted: 23 Jan 2015, 01:31
by Jan
Hi, yes, this is right. In category view, there is not ownership assigned. Every user who has rights to upload into a category, can upload there and there cannot be limits as e.g. if 5 users can upload to one category, you cannot limit e.g. only one user.
- In UCP the upload limit works because only the owner of the category can upload
- in Category view it does not work, because the owner is not the only one who can upload
Jan
Re: total size user uploads not working
Posted: 23 Jan 2015, 12:01
by Dutchpainter
Hi Jan,
I read your reply. I don't want the users to be able to upload without limits. So that means i have to find out if I can change a bit of code.
Thank you,
Dutchpainter
Re: total size user uploads not working
Posted: 23 Jan 2015, 14:29
by Dutchpainter
Hi,
have been going through your code. I'm not a programmer, so it was a bit difficult, but I managed. I have found the following solution:
in p phocagallery/controllers/category.php I uncommented the text near line 405 following
// Check the size of all images by users
I had to make a little change in one line, because the userId was not correct.
Code: Select all
//$allFileSize = PhocaGalleryFileUploadFront::getSizeAllOriginalImages($file, $this->_user->id);
$allFileSize = PhocaGalleryFileUploadFront::getSizeAllOriginalImages($file, $user->get('id', 0));
Now it works fine for me.
DutchPainter
Re: total size user uploads not working
Posted: 24 Jan 2015, 00:27
by Jan
Ok, thank you for the info and for the guide.
Jan
Re: total size user uploads not working
Posted: 24 Jan 2015, 13:24
by Dutchpainter
N.B.
This is only a fix for the normal singleuser upload. You have to do something similar for the other upload types.
DutchPainter
Re: total size user uploads not working
Posted: 04 Feb 2015, 21:54
by jeejeestudio
Great i noticed it too with an test upload with a picture with a bigger resolution but a small amount of bytes. And this also just uploaded.
Is there no plugin available to auto-resize a picture to the max format you allow ? say rezise a picture to 800x600 and quality to 90% is good enough and saves very much space on the server.
Thanks.
Re: total size user uploads not working
Posted: 08 Feb 2015, 00:31
by Jan
Hi, in Phoca Gallery you can manage the thumbnails but not original images - they are used for different features (thumbnails are made from original images so the quality should stay good, the original image can be used for download, etc. etc.)
E.g. if you use java upload feature, it can then manage the size when uploading from your PC but there is no plugin which is used on the server - (to resize) - so such needs to be customized
Jan
Re: total size user uploads not working
Posted: 08 Feb 2015, 11:32
by jeejeestudio
Ok thanks Jan.
Maybe in a future build
