Space/resource limit per user

Author Message

Piotrek Karaś

Friday 04 July 2008 4:25:24 pm

Hello there,

I'm getting ready to implementing some sort of user-based resource limit in eZ Publish. The point is to have control over what a user can upload, for example a limit of 20MB of photos/video per account.

Do you have any experiences with such approach? I expect quite a bit of work and thinking and decision making, for example when it comes to what exactly to measure in case of images ;) Any experiences or thoughts would be greatly appreciated.

Also, I believe this would be an important community feature, don't you think?

Thanks,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

michiel n.

Thursday 10 July 2008 2:54:18 am

I'd say keep the webdav functionality in mind.

Then on top of that: you probably want to try to keep it os and fs-independent which can be tricky.

And like you mentioned: what with images? Maybe you have the rounded-corners, small, thumb, etc. images. Which all add up to diskspace. Same goes for movies: maybe you want users to be able to download the original file and on top of that offer 2 different quality versions....

I'm curious what you will come up with!

Certified eZ developer looking for projects.
michieln at gmail dot com
http://ez.no/certification/verify/225305

Piotrek Karaś

Saturday 12 July 2008 6:25:42 am

The project was terminated, so I no longer worry about it, even though I may still try to approach such functionality. Yes, definitely a tricky problem under eZ Publish. As far as images go, I would have probably introduced two modes, calculating the space of either all the resources (including aliases) or just the originals/sources, which also stands a form of control. Let you know if anything happens ;)

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Noicokuna Niemoge

Thursday 22 January 2009 11:55:39 pm

It should be in eZ by default... but anyway.

Shiki soku ze ku...

Kristof Coomans

Friday 30 January 2009 7:03:04 am

Some thinking:

You can track the total file size of published items in a separate table, per user. Increase when an object gets published, decrease when an object gets removed. We need a signal / post remove workflow trigger though to be able to track this, which is currently not available in eZ Publish.

Using the new content edit handler validation feature, test on the file size of any supported datatypes (binary file, image, ...) and compare it with the file size of all published items with the same owner:

valid = max >= ( total_sizes_object_owner - current_size_of_object + new_size_of_object )

If the object is not published now, then current_size_of_object is 0.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.