需要从客户端计算机获取上载文件的完整路径。 [英] Needed to take the full path of the uploaded file from client Machine.

查看:60
本文介绍了需要从客户端计算机获取上载文件的完整路径。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我只需要从客户端机器上获取上传文件的完整路径。



我试过





strDir = Upload1.PostedFile.FileName



strDir = System.IO.Path.GetFullPath(Upload1.PostedFile.FileName)


带上传控件的
,但它不起作用。





我也知道安全问题不会让服务器知道文件路径,但是还有其他备用选项需要检索文件路径。如果是,请回复帖子....

Hi friends,

I just needed to take the full path of the uploaded file from client Machine.

I tried


strDir = Upload1.PostedFile.FileName

strDir = System.IO.Path.GetFullPath(Upload1.PostedFile.FileName)

with upload control, but it doesn't work that kind.


I too know that security concerns will not allow the server to be aware of the file path, but are there any other alternate options to retrieve the file path. If yes please reply to the post....

推荐答案

没办法。浏览器不允许这样做。而且,你实际上并不需要这个。



再次检查你的要求。如果您有任何疑问,请随时在此处添加评论。
No ways. Browsers won't allow this. Moreover, you don't need this actually.

Review your requirements again. If you have any questions, please feel free to add a comment here.


这篇关于需要从客户端计算机获取上载文件的完整路径。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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