Question

I found a very good uploader script here: http://valums.com/ajax-upload/ However, I want to be able to limit to total upload size of all the files. It lets me restrict the individual sizes, but is there a way to limit the total of all the sizes? For example, if I restrict the individual max size to 10MB, I could upload 20 9.8 MB files. I want to be able to let the files be any size they want as long as the total size of all the files don't go higher than 10 MB. Is this possible?

Was it helpful?

Solution

I have found a solution myself. I put in a total size variable at the top, and added the file sizes to the total size variable each time, and I checked against that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top