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
total size user uploads not working
-
Dutchpainter
- Phoca Newbie

- Posts: 9
- Joined: 22 Jan 2015, 15:37
- Location: Netherlands
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: total size user uploads not working
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
- 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
If you find Phoca extensions useful, please support the project
-
Dutchpainter
- Phoca Newbie

- Posts: 9
- Joined: 22 Jan 2015, 15:37
- Location: Netherlands
Re: total size user uploads not working
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
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
-
Dutchpainter
- Phoca Newbie

- Posts: 9
- Joined: 22 Jan 2015, 15:37
- Location: Netherlands
Re: total size user uploads not working
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.
Now it works fine for me.
DutchPainter
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));
DutchPainter
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: total size user uploads not working
Ok, thank you for the info and for the guide.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
Dutchpainter
- Phoca Newbie

- Posts: 9
- Joined: 22 Jan 2015, 15:37
- Location: Netherlands
Re: total size user uploads not working
N.B.
This is only a fix for the normal singleuser upload. You have to do something similar for the other upload types.
DutchPainter
This is only a fix for the normal singleuser upload. You have to do something similar for the other upload types.
DutchPainter
- jeejeestudio
- Phoca Professional

- Posts: 113
- Joined: 12 Feb 2008, 13:44
- Location: Netherlands
Re: total size user uploads not working
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.
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.
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: total size user uploads not working
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
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
If you find Phoca extensions useful, please support the project
- jeejeestudio
- Phoca Professional

- Posts: 113
- Joined: 12 Feb 2008, 13:44
- Location: Netherlands
Re: total size user uploads not working
Ok thanks Jan.
Maybe in a future build
Maybe in a future build