mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
commit raw file
This commit is contained in:
1 parent
417d861be6
commit
10b412d237
2 files changed
+13
-3
No files matched your search
@@ -53,7 +53,7 @@ func IsTextFile(data []byte) (string, bool) {
|
||||
|
||||
func IsImageFile(data []byte) (string, bool) {
|
||||
contentType := http.DetectContentType(data)
|
||||
if strings.Index(contentType, "img/") != -1 {
|
||||
if strings.Index(contentType, "image/") != -1 {
|
||||
return contentType, true
|
||||
}
|
||||
return contentType, false
|
||||
|
||||
Reference in new issue
Block a user