File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Uploading a file using the FileUpload control was failing only with IE8 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Uploading a file using the FileUpload control was failing only with IE8" Watch "Uploading a file using the FileUpload control was failing only with IE8" New topic
Author

Uploading a file using the FileUpload control was failing only with IE8

Anil Prasad
Greenhorn

Joined: Feb 22, 2006
Posts: 14
Hi,

In my application I store location of local files attached .

Now IE8 has option to include the local directory path for the Internet Zone on the client-side.

Default value is false ,as a result IE7 and IE8 has different behaviour.

IE 7
Content-Disposition: form-data; name="targetFile"; filename="C:\Users\<username>\Desktop\abc.txt"
ยท IE 8
Content-Disposition: form-data; name="targetFile"; filename="abc.txt"

Now , I can not say every user to change IE8 setting.I want to fix it in my code.

Please help me out.

Thanks in advance
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Can't you do something like this:


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

That is a security hole in IE7 that has been fixed. All browsers other than IE do not give you the local file path either.

It's IE7 that's broken, not IE8. You should not be relying upon the local path.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Uploading a file using the FileUpload control was failing only with IE8
 
Similar Threads
file upload using flex and jsp getting extra things...
Cannot get filenames
how to include file-separator in fileName?
Content-Disposition: Download file name problem
Uploading a file to the server(oreilly's MultiPartRequest class)