Why not read the files in the directory, add up the sizes of the files, and if it's over a certain number, say 10 megs, it won't let you add it.
I use a similar scheme at
http://supratest.ue3.net
When a user submits a photo, the size/name/etc gets recorded in the DB. A cumulative total of file sizes is kept and if they exceed 10 megs, then they get a message stating they're over their quota when they try and upload another file.
% of quota used is also displayed in their user-control section.
As I said, another non-DB way of doing this would be to read a directory, load the file sizes in an array, and add them up. If you do this as a 'check' before uploading the file, then depending on the size, they'll either be allowed to upload it, or denied.