Skip to content

Commit

Permalink
fix:go.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
FantasyRL committed Nov 12, 2024
1 parent 464f13b commit 4fc2839
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
k8s.io/client-go v0.31.2
)

require github.com/h2non/filetype v1.1.3 // indirect
require github.com/h2non/filetype v1.1.3

require (
cloud.google.com/go v0.116.0 // indirect
Expand Down
6 changes: 1 addition & 5 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,7 @@ func IsAllowImageFile(header *multipart.FileHeader) (string, bool) {
return "", false

Check warning on line 205 in pkg/utils/utils.go

View check run for this annotation

Codecov / codecov/patch

pkg/utils/utils.go#L202-L205

Added lines #L202 - L205 were not covered by tests
}

// 使用filetype包判断文件类型
kind, err := filetype.Match(buffer)
if err != nil {
return "", false
}
kind, _ := filetype.Match(buffer)

// 检查是否为jpg、png
switch kind {
Expand Down

0 comments on commit 4fc2839

Please sign in to comment.