fix
This commit is contained in:
10
utils/image/image_format.go
Normal file
10
utils/image/image_format.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package image
|
||||
|
||||
// 校验上传图片类型合法不合法
|
||||
func CheckUploadImageFormat(fileName string) bool {
|
||||
switch ext {
|
||||
case "jpg", "png", "fbx", "glb", "hdr", "jpeg", "svg", "pdf", "psd", "webp", "gif":
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user