Does anyone have an example of how to upload multiple files using the ClientHttpRequest class. I've successfully upload a single file but wasn't sure how to build an array of files and upload. Thanks
Printable View
Does anyone have an example of how to upload multiple files using the ClientHttpRequest class. I've successfully upload a single file but wasn't sure how to build an array of files and upload. Thanks
If using the ClientHttpRequest class is not a requirement I have the code (html & java servlet) for using a MultipleRequestHandler, it enables the client to upload multiple files of any type. Can that be useful ?
I guess it doens't have to be, it was just being used in the project I was messing with and seemed pretty simple. I can take a look at what you have if it isn't too difficult to implement. Thanks
I am interested in your html & java servlet example. Can you share?
Sorry for this late response, my internet connection has been gone for weeks
:(
Here is the servlet code. This servlet handles a form with multiple file tags a submit button an a hidden parameter (max upload size). File storage is not implemented in the Uploader servlet class (so you will have to make use of the methods
getFile(), getFileList() and getFileNames() in the MixedRequestHandler class)
anybody send the source code for multible file upload using servlet
regards,
ragovindan
You could try an HTTP upload applet such as JFileUpload:
http://www.jfileupload.com/products/...oad/index.html
It could work with Jakarta File Upload to handle request on server-side:
http://commons.apache.org/fileupload/
(Source code is available).
I hope it helps.