Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop

This commit is contained in:
laodaming 2023-08-23 15:20:44 +08:00
commit 45a179fc16

View File

@ -2,6 +2,7 @@ package file
import (
"context"
"fmt"
"fusenapi/model/gmodel"
"fusenapi/utils/basic"
"net/http"
@ -45,6 +46,7 @@ type UploadBaseRes struct {
}
func (upload *Upload) UploadFileByBase64(req *UploadBaseReq) (*UploadBaseRes, error) {
fmt.Printf("base64上传参数%+v", req)
// 定义存储桶名称
var bucketName *string
var apiType int64 = req.ApiType
@ -69,6 +71,12 @@ func (upload *Upload) UploadFileByBase64(req *UploadBaseReq) (*UploadBaseRes, er
var resourceId string = req.FileHash
var uploadBaseRes = UploadBaseRes{}
// var refresh bool
// if req.ResourceId != "" {
// refresh = true
// }
err := upload.MysqlConn.Transaction(func(tx *gorm.DB) (err error) {
var resourceInfo *gmodel.FsResource