When I select a file and submit the form, at the end of the URL and after the question mark(?) it shows:
?file=fileName.jpg
My problem is that if the user selects two files, they must show both in the URL. Like the following:
?file=fileName.jpg&anotherFileName.jpg
I can actually have more than one file. But no matter how many files I select, it only shows one.
This is not what I'm looking for, it only shows selected photos (http://jsfiddle.net/0GiS0/Yvgc2/).
But I want to submit all the files in the form, using only one <input type="file" />
发布评论
评论(4)
使用 post 和 multipart 格式上传文件
Use post and multipart format to upload files
for 必须添加 multiple = true

for got to add multiple = true

输入类型=“文件”名称=“文件”多个=“true”
input type="file" name="file" multiple="true"
您可能想看看这些类似的问题:
在名称属性
链接后面加上括号:
多文件上传器仅发送一个文件
并
使用该元素的文件属性:
链接:
使用 javascript 从多文件上传控件中检索文件名
You may want to look at these similar problems:
Put brackets after the name attribute
link:
Multiple file uploader only sends one file
and
Use the files property of that element:
link:
Retrieving file names out of a multi-file upload control with javascript