Skip to content

Commit

Permalink
feat: update supported mime types
Browse files Browse the repository at this point in the history
  • Loading branch information
Azhovan committed Aug 25, 2024
1 parent 4284ece commit 949928c
Showing 1 changed file with 55 additions and 14 deletions.
69 changes: 55 additions & 14 deletions pkg/download/mime.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,17 @@ var commonMimeTypes = map[string]string{
"text/x-sass": ".sass",
"text/x-scss": ".scss",

"image/jpeg": ".jpg",
"image/png": ".png",
"image/gif": ".gif",
"image/svg+xml": ".svg",
"image/webp": ".webp",
"image/bmp": ".bmp",
"image/jpeg": ".jpg",
"image/png": ".png",
"image/gif": ".gif",
"image/svg+xml": ".svg",
"image/webp": ".webp",
"image/bmp": ".bmp",
"image/avif": ".avif",
"image/tiff": ".tiff",
"image/vnd.wap.wbmp": ".wbmp",
"image/x-icon": ".ico",
"image/x-jng": ".jng",

"application/x-gzip": ".gz",
"application/x-tar": ".tar",
Expand All @@ -59,6 +64,32 @@ var commonMimeTypes = map[string]string{
"application/vnd.openxmlformats-officedocument.presentationml.presentation": ".pptx",
"application/vnd.ms-powerpoint": ".ppt",
"application/rtf": ".rtf",
"application/atom+xml": ".atom",
"application/rss+xml": ".rss",
"application/mac-binhex40": ".hqx",
"application/postscript": ".ps",
"application/vnd.apple.mpegurl": ".m3u8",
"application/vnd.google-earth.kml+xml": ".kml",
"application/vnd.google-earth.kmz": ".kmz",
"application/vnd.oasis.opendocument.graphics": ".odg",
"application/vnd.oasis.opendocument.presentation": ".odp",
"application/vnd.oasis.opendocument.spreadsheet": ".ods",
"application/vnd.oasis.opendocument.text": ".odt",
"application/vnd.wap.wmlc": ".wmlc",
"application/wasm": ".wasm",
"application/x-cocoa": ".cco",
"application/x-java-archive-diff": ".jardiff",
"application/x-java-jnlp-file": ".jnlp",
"application/x-makeself": ".run",
"application/x-pilot": ".prc",
"application/x-redhat-package-manager": ".rpm",
"application/x-sea": ".sea",
"application/x-shockwave-flash": ".swf",
"application/x-stuffit": ".sit",
"application/x-tcl": ".tcl",
"application/x-x509-ca-cert": ".crt",
"application/x-xpinstall": ".xpi",
"application/xspf+xml": ".xspf",

"audio/webm": ".webm",
"audio/wav": ".wav",
Expand All @@ -79,6 +110,8 @@ var commonMimeTypes = map[string]string{
"audio/x-ms-wma": ".wma",
"audio/vnd.apple.mpegurl": ".m3u8",
"audio/vnd.dolby.dd-raw": ".ac3",
"audio/x-m4a": ".m4a",
"audio/x-realaudio": ".ra",

"video/mp4": ".mp4",
"video/x-msvideo": ".avi",
Expand All @@ -98,15 +131,23 @@ var commonMimeTypes = map[string]string{
"video/x-m4v": ".m4v",
"video/x-ms-wmv": ".wmv",
"video/x-sgi-movie": ".movie",
"video/x-smv": ".smv",
"application/x-mpegURL": ".m3u8",
"video/MP2T": ".ts",
"video/3gpp": ".3gp",
"video/mp2t": ".ts",
"video/x-mng": ".mng",
"video/x-ms-asf": ".asf",
"video/x-smv": ".smv",

"application/x-httpd-php": ".phtml",
"text/markdown": ".md",
"application/vnd.ms-fontobject": ".eot",
"font/otf": ".otf",
"font/ttf": ".ttf",
"font/woff": ".woff",
"font/woff2": ".woff2",
"application/x-httpd-php": ".phtml",
"text/markdown": ".md",
"application/vnd.ms-fontobject": ".eot",
"font/otf": ".otf",
"font/ttf": ".ttf",
"font/woff": ".woff",
"font/woff2": ".woff2",
"text/mathml": ".mml",
"text/vnd.sun.j2me.app-descriptor": ".jad",
"text/vnd.wap.wml": ".wml",
"text/x-component": ".htc",
}

0 comments on commit 949928c

Please sign in to comment.