posted 12 years ago
New to Spring here trying to get a file upload. I have everything set up to handle the file, the form, controller, etc. I have it such that the controller gets the actual file, but my problem is now where to have the controller actually write the file to.
How do I get a path such that it will place it in a temp directory to have it available for the rest of the web application? I see an example where it saves to DB, gets a path from the System.properties (which seems bad to me) and then a hard coded value. How do I get a web application variable (relative path to tmp dir) from within the controller class?
(Code is just a simple prototype for learning)