Content Types
Routes that serve package files, such as GET /file/{hash}/{*path}, and the
package artwork, thumbnail, and media item routes, use a content type
determined by the file’s extension.
The Content-Security-Policy: sandbox header is included with responses where
doing so does not break built-in browser preview pages.
Binary and unrecognized file extensions are served sandboxed with
Content-Type: application/octet-stream and Content-Disposition: attachment.
Files under /mount/ are served with a content type guessed from their
extension, not using the following table, and are not sandboxed.
| extensions | content type | sandboxed |
|---|---|---|
flac | audio/flac | false |
jpeg, jpg | image/jpeg | true |
m4a | audio/mp4 | false |
mp3 | audio/mpeg | false |
mp4 | video/mp4 | false |
png | image/png | true |
css, csv, html, js, json, md, svg, toml, tsv, txt, xml, yaml | text/plain;charset=utf-8 | true |
webm | video/webm | false |