上传图片测试

This commit is contained in:
苏尹岚
2020-04-01 09:35:45 +08:00
parent 73a261df90
commit 54248a385f

View File

@@ -81,9 +81,9 @@ func RegisterDataResource(ctx *jxcontext.Context, name, resourceURL, mimeType, h
return nil, err
}
fmt.Println("test11111111111111111")
img.Bounds().Dy()
if imgType == model.ImgTypeMain {
fmt.Println("test222222222222222222222")
fmt.Println(img.Bounds().Dx(), img.Bounds().Dy())
if img.Bounds().Dx() != MainImgWidth || img.Bounds().Dy() != MainImgHeight {
return nil, fmt.Errorf("图片大小:%dx%d非法要求必须:%dx%d", img.Bounds().Dx(), img.Bounds().Dy(), MainImgWidth, MainImgHeight)
}