aspose 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 Soft Skills this week in the Jobs Discussion 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: 61756
    
  67

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]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Uploading a file using the FileUpload control was failing only with IE8