html - Internet Explorer 的目录上传

标签 html google-chrome internet-explorer browser

我在我的页面上使用 webkitdirectory 属性来允许用户上传整个目录:

<input webkitdirectory type="file" />

这适用于 Chrome、Firefox 和 Edge,但不支持 Internet Explorer。是否有替代方案来支持 IE?

最佳答案

不行,如果浏览器本身不支持就没有办法了,这跟网页中的javascript无法访问的文件系统有关。

一种替代方法是使用 multiple 属性上传多个文件 ( reference ),但这仍然只在 IE10 中支持,并且不会保留目录结构。

关于html - Internet Explorer 的目录上传,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42449599/

相关文章:

html - jcarousel 和响应式布局

javascript - 是否可以在没有 onPaste 处理程序的情况下读取 Chrome 中的剪贴板内容?

javascript - JayData 上下文中的实体未定义

html - IE11 flex child 不会收缩以给其他具有非包装内容的 child 留出空间

html - 防止表格单元格在 Internet Explorer 中调整大小

javascript - 使用序列化在 mysql 上存储多个文本输入

html - IE 7 问题 : Super simple page - TD height not taking effect

javascript - 如何更改自己定义的属性

javascript - ng 中的多个功能 - 单击仅触发一次功能

css - Internet Explorer 错误地计算了 td 中生成的内容的百分比高度