动态设置文件输入的值 [英] Dynamically set value of a file input

查看:174
本文介绍了动态设置文件输入的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法设置文件输入的值(< input type =file/> )或者是为了安全而被阻止?我试图使用谷歌齿轮的openFiles来制作一个简单的多上传程序。

Is there a way to set the value of a file input (<input type="file" />) or is that all blocked for security? I'm trying to use google gears' openFiles to make a simple multi-uploader.

推荐答案

不可能动态更改文件字段的值,否则您可以将其设置为c:\yourfile,并且非常容易地窃取文件。

It is not possible to dynamically change the value of a file field, otherwise you could set it to "c:\yourfile" and steal files very easily.

然而,上传系统。我猜想你想要一个多选择打开的对话框。

However there are many solutions to a multi-upload system. I'm guessing that you're wanting to have a multi-select open dialog.

也许看看 http://www.plupload.com/ - 这是一个非常灵活的解决方案,多个文件上传,并支持放置区域等。

Perhaps have a look at http://www.plupload.com/ - it's a very flexible solution to multiple file uploads, and supports drop zones e.t.c.

这篇关于动态设置文件输入的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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