if your project is in a servlet container (webserver like tomcat ) you could do something like this
Code:
// make reference to image directory
String basePath = request.getSession().getServletContext().getRealPath("");
String imageDir = basePath + "/" + "Images";
File dir = new File(imageDir);
// save file
File imageFile = new File(imageDir, imageName);
and the copy multipartfile to newly created file.
Do not forget to set the defaultencoding to UTF-8 of your MultiPartResolver class. Otherwise you can have some nasty bugs
. See http://www.cybersnippet.nl/blog/entr...em_with_spring