是否可以有两个“< input type = file>”在一个表格内? [英] Is it possible to have two "<input type=file>" within a single form?

查看:94
本文介绍了是否可以有两个“< input type = file>”在一个表格内?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可能包含以下内容

<form id="uploadForm" action="upload.ashx" method="post" enctype="multipart/form-data">
<p>Upload File 1</p>
<input type="file" name="file1"/>
<p>Upload File 2</p>
<input type="file" name="file2"/>
<input type="submit" value="Submit" />
</form>

我知道我可以使用 Jquery Multi-File-Upload 插件,用于从单个输入元素上传多个文件。
情况是最终用户将上传产品的多个图像,我希望能够提示他们进行分类。例如,一个图像可以是前视图,第二个可以是后视图。
当我尝试上面的HTML时,我只看到第一个文件在Firebug中发布。

I know I can use the Jquery Multi-File-Upload plugin to upload multiple files from a single input element. The situation is that the end user will be uploading multiple images of a product and I would like to be able to prompt them for sep. image for example one could be a front view and the second could be a back view. When I try the above HTML however I only see the first file being posted in Firebug.

更新:

看起来这可能与Firebug有关,因为我修改dest .ashx页面只是吐出从post请求收到的文件名我得到两个文件。
同样在Firebug控制台中,我看到此消息隐藏在发布的数据中
... Firebug已达到Firebug请求大小限制。 ...

Looks like this may be something with Firebug as when I modify the dest .ashx page to just spit back the filenames that it received from the post request I get both Files. Also in the Firebug console I see this message buried amongst the posted data ... Firebug request size limit has been reached by Firebug. ...

推荐答案

这对我来说很好。文件正在上传到我的服务器就好了。

That works fine for me. The files are being uploaded to my server just fine.

这篇关于是否可以有两个“&lt; input type = file&gt;”在一个表格内?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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