Thursday, 29 August 2013

Spring MultipartFile upload file location

Spring MultipartFile upload file location

I am using Spring framework MultipartFile to upload files using my
application to the server, though whenever I do any 'Project > Clean' from
Eclipse STS, all files I've uploaded earlier get deleted automatically.
I am saving all files uploaded to the following path:
String rootPath =
request.getSession().getServletContext().getRealPath("contentrepository");
Which in real path get translated to:
C:\springsource\apache-tomcat-7.0.40\webapps\myapp\contentrepository\
so can someone please tell me what I am doing wrong here to cause those
files to get deleted each time I do a Porject > Clean? Is it that STS
clean command empty the webapps folder content? Shall I change the upload
files folder location to another locations outside the apache folder
totally?
Thanks or your time

No comments:

Post a Comment