I’m trying to use this fileUpload component example to work in my own project. However, whenever I upload something, it says it uploads and completes successfully, but I have no idea where on the server it’s going. I use the Windows search feature to find the filename of the file I just uploaded, but it doesn’t return anything.
According to this page, the file should be stored in a temp file somewhere, but a scan of the whole server (again using the Windows search program) turns up nothing. I’m using Oracle WebLogic if that helps.
How can I find out what’s happening to the uploaded file?
From the linked page:
So, the linked code example stores it in the server’s memory in flavor of a
byte[]. You’re supposed to write it to a file yourself usingFileOutputStream. If you setcreateTempFilestotrue, then you can obtain a fullworthyjava.io.Fileobject byorg.richfaces.model.UploadItem#getFile()which in turn provides methods to reveal the actual path, such asFile#getAbsolutePath().I would recommend to set it to
trueanyway. Large concurrent uploads from multiple users may causeOutOfMemoryExceptions otherwise. You don’t want to have that in production.