提取上传文件的完整文件路径 [英] Extracting Full File Path Of Uploaded File
本文介绍了提取上传文件的完整文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨Guyz !!!
在我的应用程序中,我想提取使用FileUpload服务器控件上传的文件的整个路径。
My网络应用。将只在localhost上运行。
我尝试了很多东西来提取上传文件的完整路径,但是徒劳无功!!!
And我只需要上传文件的路径,我不想上传该文件。
如果您知道其他任何方式,请帮我!!!
Thanx很多!!!:D
Hi Guyz!!!
In my application I want to extract whole path of file uploaded using FileUpload server control.
My web app. will be running only on localhost.
I tried many things to extract full path of uploaded file,but in vain!!!
And i only need uploaded file's path,i dont want to upload that file.
If you know any other way to do so ,please help me!!!
Thanx alot!!!:D
推荐答案
你不能这样做。
安全问题不允许服务器通过FileUpload控件知道客户端的文件和/或网络结构,只知道文件名。
You can't do it.
Security concerns will not allow the server to be aware of the file and / or network structure of the client via the FileUpload control, just the file name.
如果它是本地服务器,U可以尝试fileUpload.PostedFile.FileName这将有所帮助。
If it is a local server, U can try fileUpload.PostedFile.FileName this will help.
这篇关于提取上传文件的完整文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文