这是可能获得上述&lt完整客户端路径; ASP:文件上传>按钮? [英] Is this possible to get full client path in <asp:FileUpload> button?

查看:100
本文介绍了这是可能获得上述&lt完整客户端路径; ASP:文件上传>按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用Button.I从客户上传一个文件已经获得完整的客户端path.for例如:

I have to upload one file from client using Button.I have to get the full client path.for example,

假设,用户从本地计算机上载的文件D:\\我的文件\\文档\\的test.xml。所以,现在我想获得相同的路径(D:\\我的文件\\文档\\的test.xml )进行further.how我该怎么做呢?

suppose, user uploaded a file from this local machines "d:\my files\docs\test.xml".So, now i want to get the same path("d:\my files\docs\test.xml") to proceed further.how do i get it?

我已经使用FileUpload1.PostedFile.FileName ...但它工作得很好用IE和而不是在Firefox ...

i have used FileUpload1.PostedFile.FileName...But it is worked fine with IE and but not in Firefox...

所以,你可以帮我这个对Firefox和Chrome ...

So, Can you help me with this for Firefox and chrome...

推荐答案

好来源:

<一个href=\"http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-v-com$p$phensive-protection.aspx\" rel=\"nofollow\">http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-v-com$p$phensive-protection.aspx

检出接近底部的文件上传控件一节。报价:

Checkout the "File Upload Control" section near the bottom. quoted:

此外,在上传文件时包含本地目录路径
  URLAction已被设置为禁用Internet区域。这种变化
  潜在的敏感本地文件系统的prevents泄漏
  信息到互联网。例如,而不是在提交
  完整路径C:\\用户\\ ericlaw \\文件\\秘密\\ image.png,互联网
  Explorer 8中现在将只提交文件名image.png。

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.

这表明它是可能的,如果该网站是信任(IE)/旧的浏览器

This would suggest it is possible if the site is trusted (in IE) / older browsers

这篇关于这是可能获得上述&lt完整客户端路径; ASP:文件上传&GT;按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆