DiskQuota Module for Omeka S

DiskQuota lets administrators set and enforce per-user and per-site storage limits in Omeka S. It tracks usage and blocks uploads that would exceed configured quotas.
Features
- Set max storage per user and per site
- Track current storage usage per user/site
- Block uploads that exceed quota
- Admin UI for viewing and managing quotas
Quick Start (Docker)
- Requirements: Docker Desktop 4+, Make
- Start stack:
make upthen openhttp://localhost:8080 - Stop stack:
make down
This dev stack uses erseco/alpine-omeka-s:develop (service omeka) and mariadb. Your module is mounted at /var/www/html/volume/modules/DiskQuota.
Sample Data (optional)
- Place a CSV at
data/sample_data.csvand it will be auto-imported on first boot when CSVImport is available. - Import manually any time:
make import-sample
Default admin user (created on first boot):
- admin@example.com password: PLEASE_CHANGEME
Useful Make Targets
make up/make upd: Run in foreground/backgroundmake down/make clean: Stop, optionally remove volumesmake logs/make ps: Tail logs, show statusmake shell: Shell into theomekacontainermake enable-module: Enable DiskQuota inside Omeka Smake test: Run PHPUnit testsmake test-coverage: Generatecoverage.xmland require at least 90% line coverage (PCOV or Xdebug required)make package VERSION=x.y.z: Build a distributable ZIP
Run make help to see all targets.
Manual Installation
- Download the latest release from the GitHub releases page
- Extract the ZIP into your Omeka S
modulesdirectory asDiskQuota/ - In Omeka S admin, go to Modules and click Install on DiskQuota
See the official docs for Installing a module.
Usage
- In the admin panel, set user quotas:
- Go to Users → select a user → User Settings tab
- Set the desired quota in megabytes (MB)
- Set site quotas:
- Go to a Site’s admin → Site admin tab
- Set the desired quota in megabytes (MB)
- Use
0for unlimited.
Uploads that exceed the configured quota are blocked. Site usage counts original media only for items assigned to the site. Attaching an item set does not add its items to the site's usage. Uploads to an item assigned to multiple sites must fit every site's quota.
Coverage
CI installs dependencies from composer.lock, runs PHPUnit with PCOV, and fails below 90% line coverage across Module.php and src/. The SQLite regression tests require pdo_sqlite and exercise the actual site membership queries. Codecov receives the Clover report using GitHub OIDC authentication, with no upload token required. Both project and patch coverage targets are 90%.
To run the same coverage check locally after composer install:
make test-coverage
# With Xdebug instead of PCOV:
XDEBUG_MODE=coverage make test-coverage
Requirements
- Omeka S 4.x or later
- PHP 8.1+ (module and tests)
License
Published under the GNU GPLv3.