commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Schalk Neethling <sch...@volume4.com>
Subject [fileUpload] Question about file name
Date Thu, 09 Jun 2005 17:56:29 GMT
Hey there everyone!

Hope someone can give me an answer here. I am using the fileUpload 
package in one of my apps and have had some trouble getting the actual 
file name when the user is using IE. In IE the entire location string is 
sent by the browser instead of just the file name. Now, I have found a 
way to get past that, I thought, but now here is my problem.

When testing the app on my local WindowsXP machine on both Firefox and 
IE it works perfectly, however, when I move this up to the server, Red 
Hat Linux, the file name written to disk when using IE is completely wrong.

Here is the code I use to get the file name:
if(item.getFieldName().equals("uploadPDF")) {
               
File fullFile  = new File(item.getName()); 
uploadPDF = fullFile.getName();
File savedFile = new File(serverFolder, uploadPDF);               
item.write(savedFile);               
}

Any idea why this would return the file name differently depending on 
which platform the app runs. BTW, the files are uploaded using a 
WindowsXP machine and IE 6.0 as the client. Any ideas? Thanks!

-- 
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers
emotionalize.conceptualize.visualize.realize
Landlines
Tel: +27125468436
Fax: +27125468436
Web
email:schalk@volume4.com
Global: www.volume4.com
Messenger
Yahoo!: v_olume4
AOL: v0lume4
MSN: volume4_@hotmail.com

We support OpenSource
Get Firefox!- The browser reloaded - http://www.mozilla.org/products/firefox/
 
This message contains information that is considered to be sensitive or confidential and may
not be forwarded or disclosed to any other party without the permission of the sender. If
you received this message in error, please notify me immediately so that I can correct and
delete the original email. Thank you.



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message