Hi, I am using jakarta struts 1.1b in a web application that uses file uploads. Struts is using the commons-fileupload package to handle the multipart form data. My form-bean has two FormFile properties. The Action that handles the upload writes the FormFiles to two files in different directories on the server.
When I upload two different files with the same name (= from different directories on the client ofcourse), the resulting files on the server are the same (= content of one of the original files). So only one of my two original files survives. My guess is the multipart handler stores the files in the temp directory with the filename from the client. The second file that is handled has the same name and overwrites the first one. A fix could be to add a number to the filename if it already exists. The following url has an example that handles naming conflicts with existing files http://www.servlets.com/cos (look for FileRenamePolicy). Regards, Nico Krijnen --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
