refactor(service): 重构服务代码结构并更新配置
This commit is contained in:
@@ -11,7 +11,7 @@ func DetectFileType(data []byte) (contentType string, ext string) {
|
||||
return "application/octet-stream", ""
|
||||
}
|
||||
ct := http.DetectContentType(data)
|
||||
// http.DetectContentType 可能带 charset 等参数:text/plain; charset=utf-8
|
||||
// gateway.DetectContentType 可能带 charset 等参数:text/plain; charset=utf-8
|
||||
if idx := strings.Index(ct, ";"); idx > 0 {
|
||||
ct = strings.TrimSpace(ct[:idx])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user