【问题标题】:Read contents of a file with the Javascript File API with a file URL instead of file input使用带有文件 URL 而不是文件输入的 Javascript File API 读取文件的内容
【发布时间】:2023-03-31 17:00:01
【问题描述】:

我在 HTML5/JS 文件 API 上看到的所有示例都通过让用户首先使用选择文件来读取文件

<input type="file">

我希望能够使用文件的 URL/路径来读取文件的内容。我怎样才能做到这一点?

【问题讨论】:

    标签: javascript fileapi


    【解决方案1】:

    出于安全考虑,这不能从浏览器中完成。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-14
      • 1970-01-01
      • 1970-01-01
      • 2019-02-23
      • 1970-01-01
      • 2011-09-21
      相关资源
      最近更新 更多