从不同文件夹上传HTML多个文件 [英] HTML multiple file upload from different folders

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

问题描述

我有一个带有上载字段的表单,允许用户选择多个文件.但是,我需要能够允许用户从文件夹1中选择文件1,然后再从文件夹2中选择文件2,依此类推.

I have a form with an upload field that allows users to select multiple files. However, I need to be able to allow the user to select file 1 from folder 1, then go and select file 2 from folder 2, and so on.

当前,当用户从文件夹1中选择文件1然后单击打开"时,选择窗口关闭(将用户保留在我的表单上).然后,如果用户从文件夹2中选择文件2并单击打开"按钮,则文件1将被删除,仅保留文件2.

Currently, when the user selects file 1 from folder 1 then hits "Open", the selection window closes (leaving the user on my form). Then if the user goes and select file 2 from folder 2 and hits the "Open" button, file 1 is removed, leaving only file 2.

基本上,用户无法选择多个文件,除非它们都位于同一位置.选择文件2后,是否有办法使文件1保持选中状态?

Basically, the user is unable to select multiple files unless they're all in the same location. Is there a way to make file 1 stay selected after file 2 is chosen?

推荐答案

不,您不能.这是操作系统定义的一种行为,并且在它们之间可能有所不同.您无法精确地控制这些事情,并且您总是会害怕发生的事情.

No, you can't. This is a behaviour defined by the operating systems and may vary between them. You can't control these things precisly and you will always fear what happen.

如果人们必须选择的文件夹数量很少,则可以提供多个上传字段.

If the amount of folders people have to choose is quite small you could offer multiple upload fields.

这篇关于从不同文件夹上传HTML多个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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