Handle disk quota

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Handle disk quota

Luca Farsetti
Hi all, i'm trying to figured out how could i handle disk quota for a saas web application, someone have ideas or some examples/case studies about this application aspect?

Best regards

Luca
Reply | Threaded
Open this post in threaded view
|

Re: Handle disk quota

lucastex
I don't recommend being dependent of the local storage, but If I had to do something like this, I would store the fileSize in my database when the users upload the file with the file name, path and other important metadata. Just sum all file sizes later.

If you still have to calculate in the disk, you can use Commons IO FileUtils.sizeOfDirectory method:


[]s,
 



On Thu, May 2, 2013 at 7:27 AM, Luca Farsetti <[hidden email]> wrote:
Hi all, i'm trying to figured out how could i handle disk quota for a saas web application, someone have ideas or some examples/case studies about this application aspect?

Best regards

Luca