This commit is contained in:
laodaming
2023-06-12 20:05:51 +08:00
parent b6095d67ad
commit fdcd8c46e0
5 changed files with 47 additions and 12 deletions

View 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
}