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

查看:23
本文介绍了从不同文件夹上传 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天全站免登陆