Forum Moderators: phranque

Message Too Old, No Replies

Limiting/Max upload size

Don't send me so much data!

         

TimKoop

6:30 pm on Sep 27, 2006 (gmt 0)

10+ Year Member



We have a file upload page where people can upload files to our web server. Does anybody know of a way to limit the size of file that people can send? I would prefer not to pay for the bandwidth of people uploading whole DVDs at a time.

I have server-side code that will detect it, but I want to forcibly close the connection. Any ideas? Does anybody know of some module out there that might do the trick? Or anything else?

Thanks!

--
Tim

Little_G

6:50 pm on Sep 27, 2006 (gmt 0)

10+ Year Member



Hi,

What are you using to handle the file uploads? If your using PHP there are php.ini settings you can change see, upload_max_filesize [php.net].

Andrew

TimKoop

7:53 pm on Sep 29, 2006 (gmt 0)

10+ Year Member



I'm using Jakarta commons fileUpload, through a jsp page. I can detect the file size and quit processing, but I can't stop it from continuing to read all the data coming in. I've asked on their user list, but nobody says anything. Maybe somebody here knows something. I don't mind using an Apache mod solution, or anything else that works for that matter.

Thanks for responding, by the way, you're the first person to. And I've asked all over.

--
Tim

Little_G

9:23 pm on Sep 29, 2006 (gmt 0)

10+ Year Member



Hi,

I'm not very well versed with Java servlets but in the documentation there is the method setFileSizeMax() [jakarta.apache.org]. Does this not do what you want it to?

Andrew