Question

I am a newbie to spring and mvc framework. I am going through the framwork and i wanted to understand the File upload (multiple) and use spring to load my complex object.

I have seen example using MultiPartFile for single file upload.

I tried the same for trying out the multiple file upload but I failed where i tried to make generic (like allowing the user to upload as many files).

Is there a way to do it in a optimal way to have the files available as list in the controller?

Thank you for reading!!!

is there a way to handle this without using multipart resolver?

Was it helpful?

Solution

Take a look at my answer to a similar question here:

Preserving value for <form:input type="file"> with Spring MVC

This explains our approach of an asynchronous file upload handling and processing of them on a final form submit.

OTHER TIPS

I have used jquery.form.js. You can find example using Google. If not you can tell me to post a link. Moreover you should investigate how the browsers will handle the upload process (i.e.

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