HTML multiple file upload from different folders(从不同文件夹上传 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 多个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:从不同文件夹上传 HTML 多个文件


- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- 失败的 Canvas 360 jquery 插件 2022-01-01
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- addEventListener 在 IE 11 中不起作用 2022-01-01
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- 400或500级别的HTTP响应 2022-01-01
- Fetch API 如何获取响应体? 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01