Most modern filesystems on most modern operating systems implement some kind of quota support. If you can't use those because to the operating system all the files are owned by just one user then you're going to need to re-implement this functionality.
This means either keeping track of file sizes when they're uploaded, e.g. a row in a database table in which case the question "how much are they already using?" can be answered with one query. Alternatively you could work this out every time someone tries to upload a file, by finding all files they own (presumably from a DB table?) and calling stat()
or similar to query the size of each file.
Once you know how much they are already using the POST request or whatever method you're using to do the uploads will tell you the size of the incoming upload.
Be careful with size though - file size is often not the same as size on disk. Which is more important?