如何解决ASP.NET中色度文件上传中的伪路径问题 [英] How to resolved fake path issue in file upload in chroma in ASP.NET

查看:83
本文介绍了如何解决ASP.NET中色度文件上传中的伪路径问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文件上传控件,我想将上传的路径保存到数据库bt中的chrome它给我假路径请帮我解决在asp.net中chrome中的文件上传中的假路径问题



提前感谢



我的尝试:



请参考以上代码

i have a file upload control and i want to save the uploaded path to database bt in chrome it is giving me fake path please help me to resolve fake path issue in file upload in chrome in asp.net

thanks in advance

What I have tried:

please refer above code

i have a file upload control and i want to save the uploaded path to database bt in chrome it is giving me fake path please help me to resolve fake path issue in file upload in chrome  in asp.net

推荐答案

您无法获取客户端系统上文件的路径以确保安全性原因(较旧的浏览器给出了完整路径,但现代浏览器没有)。你无能为力,你需要设计你的网站,以便不需要完整的路径。
You can't get the path to the file on the client system for security reasons (older browsers gave the full path but modern browsers do not). There is nothing you can do about this, you need to architect your site such that the full path isn't needed.


这篇关于如何解决ASP.NET中色度文件上传中的伪路径问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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