I am want to save the uploaded file in temp folder till its persisted in database along with some other fields. I have a page with a form and a uploadpanel which is ajaxfileupload. User 1 open this page uploaded a file with name test.pdf and filing up other fields in the form. at this time user2 with a different session opens this page and uploaded the file with the same name .
uploaded files are saved to java.io.temp here is my upload folder uploadFolder = new Folder(System.getProperty("java.io.tmpdir"), "wicket-uploads"); uploadFolder.mkdirs(); so in my case user2 has replaced the file uploaded by user1, now when user1 persists the file and other fields to database he is persisting wrong file . Please suggest me what is the best practice to handle such situations , best practice to save files to temp folder in multi threaded application ? I thought of using a database sequence.nextval as appender to filename so that I uniquely identify the file, please suggest best practice ? a user open my page uploaded file my concern is suppose user uploads a file with filename -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/saving-uploaded-file-to-temp-folder-best-practices-tp3160036p3160036.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org