Max quota to upload? Max quota to upload?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Max quota to upload?

Started by laughtrey, October 02, 2006, 12:56:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

laughtrey

Is there a way to set a maximum amount of KB to a group, not per picture? For instance, I only want users to be able to upload 1.5mb of files total, not just 1.5mb files. Is this possible?

Sami

Exist feature , take a look at group manager , below the name of each group you have Quota box
- Next time please read the documentation first ;)
‍I don't answer to PM with support question
Please post your issue to related board

laughtrey

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv296%2Flaughtrey%2Fquota.jpg&hash=156c4a37ab5a2d161cafd337b6ecfded54406862)

That's what's bugging me.

Nibbler

The quota only applies to files uploaded within user galleries. The 'Space used' column displays the size of all files.

laughtrey

So is there a way to make a quota for uploading to public gallerys?

Nibbler

include/picmgmt.inc.php

$result = cpg_db_query("SELECT sum(total_filesize) FROM {$CONFIG['TABLE_PICTURES']}, {$CONFIG['TABLE_ALBUMS']} WHERE  {$CONFIG['TABLE_PICTURES']}.aid = {$CONFIG['TABLE_ALBUMS']}.aid AND category = '" . (FIRST_USER_CAT + USER_ID) . "'");

change to

$result = cpg_db_query("SELECT sum(total_filesize) FROM {$CONFIG['TABLE_PICTURES']} WHERE owner_id = " . USER_ID);

laughtrey


Nibbler

Now the quota applies to files uploaded everywhere.