Why use mimetype over http.DetectContentType? #356
Replies: 1 comment
-
http.DetectContentType only detects formats which are commonly served by web servers such as HTML, CSS, JS, image formats and audio and video content. If you have anything else like an ODT document it will use One example which has bitten me before is that APK files can only be installed on Android when they are served with the mime type DetectMimeType only detects 30 types, this library detects 172 types. |
Beta Was this translation helpful? Give feedback.
-
Hi there - I stumbled across this while looking at the awesome-go list. I'm planning to implement a file upload API in a project and was planning to use http.DetectContentType. I'm curious what the pros/cons are of using mimetype instead. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions