在Mozilla Firefox中没有从文件上传控件获取完整路径 [英] Not getting Full Path from File Upload control in Mozilla Firefox
本文介绍了在Mozilla Firefox中没有从文件上传控件获取完整路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hello All,
我没有在Mozilla Firefox中获取上传文件的完整路径并从IE获取。下面是我用来获取路径的代码。
Hello All,
I am not getting full path of uploaded file in Mozilla Firefox and getting from IE. Below is the code I have used to get path.
string strFileName = fileUpload.postedFile.FileName;
我必须阅读该文件并在gridview上显示。
有没有办法获取文件来自Mozilla的路径。
提前谢谢。
I have to read that file and show it on gridview.
Is there any way to get file path from Mozilla.
Thanks in advance.
推荐答案
这是你能得到的:
This is what you can get:
string path = FileUpload1.PostedFile.FileName
AFAIR,由于安全原因,最近的浏览器不再传递完整的文件路径。
看看下面关于类似主题的讨论:
FileUpload丢失目录路径。 [ ^ ]
FileUpload.PostedFile.FileName未在chrome中提供完整路径 [ ^ ]
这篇关于在Mozilla Firefox中没有从文件上传控件获取完整路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文