asp:FileUpload seems to give me the filename but not the complete path.

  • Thread starter Thread starter AAaron123
  • Start date Start date
A

AAaron123

<asp:FileUpload> seems to give me the filename but not the complete path.

I'm guessing that it a security thing and I can't get it.

Is that correct?



Thanks
 
AAaron123 said:
<asp:FileUpload> seems to give me the filename but not the complete
path.

I'm guessing that it a security thing and I can't get it.

Is that correct?



Thanks

Looks like IE8 remove the path.

I was just listing it any way.
 
Hi,
Looks like IE8 remove the path.

Correct and the edit box should be read only.

See
http://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx
and the "File Upload Control" section :

"Additionally, the "Include local directory path when uploading files"
URLAction has been set to "Disable" for the Internet Zone. This change
prevents leakage of potentially sensitive local file-system information to
the Internet. For instance, rather than submitting the full path
C:\users\ericlaw\documents\secret\image.png, Internet Explorer 8 will now
submit only the filename image.png."
 
Patrice said:
Hi,


Correct and the edit box should be read only.

See
http://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx
and the "File Upload Control" section :

"Additionally, the "Include local directory path when uploading files"
URLAction has been set to "Disable" for the Internet Zone. This change
prevents leakage of potentially sensitive local file-system
information to the Internet. For instance, rather than submitting the
full path C:\users\ericlaw\documents\secret\image.png, Internet
Explorer 8 will now submit only the filename image.png."

As an aside:
You can copy it with javascript on the onclientclick event into something,
but you get someting like:

C:/fakefolder/filename.txt

Cute

I only listed it as info because the controls text box gets cleared after
the upload.
Got a supprise when it stoped working.

Thanks
 
Back
Top