Search code examples
node.jsaudiomp3content-type

What is the Content-Type for mp3 files in node.js?


I am trying to code a web server, using the node.js 'http' module. Can anyone tell me what the 'Content-Type' header value is for mp3/audio files is? For example:

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

I hope I explained myself well. Thanks


Solution

  • It is audio/mpeg.

    I usually search for mime types to find out what should be sent as the Content-Type header for files.

    --UPDATE--

    Reading a bit more about Mime-Types, it is infact 'mime-type' that we send as Content-Type header for files.