gpt4 book ai didi

html5-video - 可以配置 MIME 类型的 Github Pages 文件吗?

转载 作者:行者123 更新时间:2023-12-04 02:30:04 24 4
gpt4 key购买 nike

我们在 Github Pages 存储库中有一个 MP4 视频文件。该文件的 MIME 类型为 application/octet-stream ,这意味着 Internet Explorer 不喜欢它。它应该是类型 video/mp4 .有没有办法配置 Github Pages 以使用正确的 MIME 类型,或者我们应该为视频找到替代的托管解决方案? help pages 中未涉及此主题.

最佳答案

该主题在此处解决:https://help.github.com/articles/mime-types-on-github-pages/

GitHub Pages supports more than 750 MIME types across 1,000s of file extensions. The list of supported MIME types is generated from the mime-db project, which aggregates MIME types from the Apache and Nginx projects as well as the official IANA list of internet content types.

MIME types are additional headers that servers send to provide browsers with information about the types of files being requested and how to handle the file once downloaded.

To add or modify MIME types for use on GitHub Pages, see the mime-db Contributing instructions.



mime-db 项目目前正在报告 mp4video/mp4 :
"video/mp4": {
"source": "apache",
"compressible": false,
"extensions": ["mp4","mp4v","mpg4"]
},

来源: https://github.com/jshttp/mime-db/blob/46a40f0524a01fb3075a7ecde92e8e04fc93d599/db.json#L6233

如果 Github 页面仍在报告 mp4文件为 application/octet-stream你应该联系 Github 支持。

关于html5-video - 可以配置 MIME 类型的 Github Pages 文件吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15951012/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com