Skip to content

Commit

Permalink
fix #1514
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrs4s committed Jun 6, 2022
1 parent 13abf92 commit b013f66
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/mime/mime.go
Expand Up @@ -31,6 +31,9 @@ func checkImage(r io.ReadSeeker) (ok bool, t string) {
if base.SkipMimeScan {
return true, ""
}
if r == nil {
return false, "image/nil-stream"
}
t = scan(r)
switch t {
case "image/bmp", "image/gif", "image/jpeg", "image/png", "image/webp":
Expand Down

0 comments on commit b013f66

Please sign in to comment.