Gallery3:Modules:quotas - Gallery Codex
Personal tools


From Gallery Codex

Quotas Module

Assign quotas to user groups and track each users space usage.


Quotas is a module for Gallery 3 that will track how much total space is being used to store each users photos and movies and will allow admins to place upload limits on user groups.

Once activated, this module will keep a running total (in bytes) of the file sizes for photos and movies as each user uploads and deletes files (albums are ignored). If a file would push a user over their limit, it will be automatically rejected on upload, with the user seeing a message that Gallery was unable to process their file.

Be aware that any module that can reassign a users photos to another user (other then deleting a user) or modify a file (other then rotating) will mess up this total file size number as the change in file size will not be logged.

This module contains a maintenance script to calculate the current disc space usage for all existing files and users. It can be found at Admin -> Maintenance -> Rebuild user quotas table.

This module will also display a message at the bottom of album/photo/movie pages for logged in users to tell them how much space they're using, and what their limit is (if they have one).

Admin users may log in and see a current user's usage from the Admin -> Content -> User quotas screen.

Admin users may assign upload limits (in megabytes) from the Admin -> Content -> User quotas screen. Admin's may also specify if resizes and thumbnails should be counted towards a users limit from this page.

Once a limit is set, all users in that group will be unable to upload more then their limit, with the exception that if a full sized image does not put the user over their limit, but the resize+thumb does, the photo will still be accepted (as resizes and thumbs are not generated until after the photo is stored in Gallery and after the quota check is run). A value of 0 can be used to specify "no limit" for a group. If a user is assigned to more then one group, the largest non-zero value will be used as their limit.


  • Track how much space each user is using.
  • Set limits on how much space each user can use.
  • Display current usage to users and admins.


This module may be downloaded from the Gallery forums here.

To install, extract the "quotas" folder from the zip file into your Gallery 3 modules folder. Afterwards log into your Gallery web site as an administrator and activate the module in the Admin -> Modules menu.