|
@@ -682,7 +682,7 @@ func BannerDowload(c *gin.Context) {
|
|
|
}
|
|
|
resourceUrl := ""
|
|
|
|
|
|
- if item == nil {
|
|
|
+ if item.ImgURL == "" {
|
|
|
randStr := utils.GetRandStringNoSpecialChar(28)
|
|
|
jpegPath := `./static/` + randStr + ".jpeg"
|
|
|
err := services.ReportToJpeg(req.BannerUrl, jpegPath)
|
|
@@ -700,7 +700,7 @@ func BannerDowload(c *gin.Context) {
|
|
|
}()
|
|
|
|
|
|
//上传到阿里云
|
|
|
- resourceUrl, err := services.UploadAliyun(randStr+".jpeg", jpegPath)
|
|
|
+ resourceUrl, err = services.UploadAliyun(randStr+".jpeg", jpegPath)
|
|
|
if err != nil {
|
|
|
response.FailData("文件上传失败", "文件上传失败,Err:"+err.Error(), c)
|
|
|
return
|