views:

187

answers:

4

Hi. I'm working on an app (based on Spring as DI and MVC framework) that has a file upload function which is currently implemented using Spring Multipart Upload (which in it's turn utilizes commons fileupload libs).

So what I'm looking for is a way to lower the upload bandwidth consumption. How can I accomplish that?

A: 

May be this one here helps : Multipart Post method example

vinaynag
Unfortunately suggested source focuses mostly on how to upload, not on how to limit upload speed. Essentially, timeout parameters may be used, but I'm not sure if it's a good practice.
den-javamaniac
A: 

I think this completely depends on the network bandwidth, this doesnot have any dependency with the Servlet programming.

Only the size of the uplaoding file might be a problem in some matters, else Every thing should be working fine

harigm
Don't know if it's true (like 100% true) yet, but it better not be)
den-javamaniac
A: 

I'm wondering if you could use the streaming API from Commons FileUpload instead of the standard API, and throttle the bandwidth that way.

Dean J
Unfortunatly no, It's not made for that purpose.
den-javamaniac
+1  A: 

Limiting the upload bandwidth consumption may not be possible unless you are using a custom file uploader on the client. Assuming that the Spring Multipart Upload is just an interface to the standard HTTP multipart form upload then it's the client web browser that implements the actual streaming of the file from the client to the server. Unless the client's browser has some functionality to limit the bandwidth it's probably trying it's best to get it uploaded as quickly as possible.

maerics
Thanks for detailed description.
den-javamaniac