【问题标题】:Allow chrome to select both/either directory or files允许chrome同时选择/选择目录或文件
【发布时间】:2011-12-23 20:53:40
【问题描述】:

如果我在 html 文件中插入 <input type="file" name="files" webkitdirectory>,chrome 将允许您选择目录,但不能选择文件。

如果我随后删除 webkit 目录 (<input type="file" name="files">),那么它只会让您选择文件。

如何允许它同时选择文件和/或目录?

【问题讨论】:

  • 我不熟悉 webkitdirectory,但据我所知,至少在 Windows 中没有一个用于选择目录和/或文件的本机对话框。所以我建议你在你的 UI 中实现这两个标签,然后让用户选择一个目录或一个文件或两者兼而有之。

标签: html google-chrome webkit directory-upload


【解决方案1】:

这是a bug我不久前提交的。

【讨论】:

    猜你喜欢
    • 2015-05-08
    • 1970-01-01
    • 1970-01-01
    • 2019-12-11
    • 2017-07-06
    • 2017-10-26
    • 1970-01-01
    • 1970-01-01
    • 2011-01-25
    相关资源
    最近更新 更多