I'm uploading images to a folder with the name of a logged in user. For example, if the user's username is bob, it'd be like /uploads/bob/image. I already have the uploads folder and creating the directory bob at runtime, as user uploads pic. The problem i'm having is, it uploads to the directory as it should be, but in the console there's an error, warning Exception synching file
couldn't find the uploaded file from the server/default/tmp/????????(Auto generated temporary value)/Project-name/project.war/uploads/bob/image. When creating a folder, system can't create a folder in the previous temporary folder. It's causing the problem. Is there a way to know the name of the automatically generated temporary directory's name or disable synching?
If it is not important that it is a temporary folder you can always get the systems temporary folder.
File tmpFile = new File(System.getProperty("java.io.tmp"))