1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-07-24 20:19:39 +02:00

commit raw file

This commit is contained in:
slene 2014-03-28 00:50:13 +08:00
parent 417d861be6
commit 10b412d237
2 changed files with 13 additions and 3 deletions

View file

@ -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