查找要上传文件的路径 [英] Find Path of File to be Uploaded

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

问题描述

我想知道用户将要使用我的表单上传的某些文件的路径.我知道出于安全原因不允许使用JavaScript,但是我正在构建的系统是内部的人员系统.可能有JavaScript证书或我可以放置在服务器上的东西说可以做到这一点吗?就像Flash允许策略文件一样.

I would like to know the paths of certain files that a user is about to upload using my form. I know this isn't allowed using JavaScript for secruity reasons but the system I am building is an internal one for staff. Is there maybe a JavaScript certificate or something that I can place on our servers to say that I can do this? In the same way as Flash allows for a Policy file.

我有一个快速的谷歌,找不到像上面的东西.我有什么选择?我的意思是我该如何尽快获取要上传的文件的路径,我将采取任何一种实现思路来克服这一问题.如果找不到解决方案,那么我正在尝试构建的东西确实是 bugging

I had a quick google and could not find anything like the above. What are my options? I mean how can I get the paths of the file soon to be uploaded, I will take any sort of implementation idea to overcome this. If I can't find a solution then what I am trying to build is well and truly buggered!

我想让用户上传包含这些路径的文本文件,但这并不完全用户友好.

I thought of asking users to upload a text file that contains these paths, but this isn't exactly user friendly.

谢谢

推荐答案

您可以很好地获取要上传的路径,但是您不能更改它...

You can get the path to be uploaded just fine, but you cannot change it...

var fil = document.getElementById("FileUpload1");
alert(fil.value); // will show file name

这篇关于查找要上传文件的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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