|
|
@ -28,9 +28,10 @@ func UploadFile(c *gin.Context) (result.Data, error) {
|
|
|
|
return nil, errors.NewBusinessError("文件不存在")
|
|
|
|
return nil, errors.NewBusinessError("文件不存在")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fmt.Println(filePath, destPath)
|
|
|
|
fmt.Println(filePath, destPath, isDeleteLocal)
|
|
|
|
url, err := global.Storage.Upload(filePath, destPath)
|
|
|
|
url, err := global.Storage.Upload(filePath, destPath)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
fmt.Println(err.Error())
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if isDeleteLocal == "1" {
|
|
|
|
if isDeleteLocal == "1" {
|
|
|
|