【问题标题】:What is the Content-Type for mp3 files in node.js?node.js 中 mp3 文件的 Content-Type 是什么?
【发布时间】:2020-05-11 15:09:11
【问题描述】:

我正在尝试使用 node.js 'http' 模块编写 Web 服务器。谁能告诉我 mp3/音频文件的“Content-Type”标头值是什么?例如:

response.writeHead(200, "OK", {"Content-Type": "audio/mp3"});

我希望我能很好地解释自己。谢谢

【问题讨论】:

    标签: node.js audio mp3 content-type


    【解决方案1】:

    audio/mpeg

    我通常搜索mime types 以找出应该作为文件的Content-Type 标头发送的内容。

    --更新--

    阅读更多关于 Mime-Types 的信息,实际上我们将“mime-type”作为文件的 Content-Type 标头发送。

    【讨论】:

      猜你喜欢
      • 2023-03-21
      • 2020-04-23
      • 2012-03-15
      • 2012-09-13
      • 2014-04-15
      • 1970-01-01
      • 2011-12-04
      • 2014-06-29
      • 2021-10-01
      相关资源
      最近更新 更多