aa
This commit is contained in:
@@ -23,8 +23,10 @@ import (
|
||||
const (
|
||||
qiniuTokenExpires = 300 // 七牛TOKEN有效时间,5分钟
|
||||
|
||||
MainImgWidth = 800
|
||||
MainImgHeight = 800
|
||||
MainImgWidth = 800
|
||||
MainImgHeight = 800
|
||||
MainImgWidth2 = 500
|
||||
MainImgHeight2 = 500
|
||||
)
|
||||
|
||||
type UploadResTokenInfo struct {
|
||||
@@ -81,7 +83,7 @@ func RegisterDataResource(ctx *jxcontext.Context, name, resourceURL, mimeType, h
|
||||
return nil, err
|
||||
}
|
||||
if imgType == model.ImgTypeMain {
|
||||
if img.Bounds().Dx() != MainImgWidth || img.Bounds().Dy() != MainImgHeight {
|
||||
if (img.Bounds().Dx() != MainImgWidth || img.Bounds().Dy() != MainImgHeight) && (img.Bounds().Dx() != MainImgWidth2 || img.Bounds().Dy() != MainImgHeight2) {
|
||||
return nil, fmt.Errorf("图片大小:%dx%d非法,要求必须:%dx%d", img.Bounds().Dx(), img.Bounds().Dy(), MainImgWidth, MainImgHeight)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user