|
|
@@ -668,7 +668,7 @@ func GetSuccessChunks(ctx *context.Context) { |
|
|
|
dbmodeluuid := attach.Description |
|
|
|
modelname := "" |
|
|
|
if dbmodeluuid != modeluuid { |
|
|
|
log.Info("The file has uploaded.fileChunk.ObjectName=" + fileChunk.ObjectName) |
|
|
|
log.Info("The file has uploaded.fileChunk.ObjectName=" + fileChunk.ObjectName + " typeCloudBrain=" + fmt.Sprint(typeCloudBrain)) |
|
|
|
model, err := models.QueryModelById(dbmodeluuid) |
|
|
|
if err == nil { |
|
|
|
modelname = model.Name |
|
|
@@ -677,7 +677,8 @@ func GetSuccessChunks(ctx *context.Context) { |
|
|
|
srcObjectName := fileChunk.ObjectName |
|
|
|
destObjectName := getObjectName(fileName, modeluuid) |
|
|
|
var isExist bool |
|
|
|
if typeCloudBrain == models.TypeCloudBrainOne { |
|
|
|
if typeCloudBrain == int(models.TypeCloudBrainOne) { |
|
|
|
log.Info("minio copy..") |
|
|
|
bucketName := setting.Attachment.Minio.Bucket |
|
|
|
if storage.MinioGetFilesSize(bucketName, []string{destObjectName}) > 0 { |
|
|
|
isExist = true |
|
|
@@ -685,6 +686,7 @@ func GetSuccessChunks(ctx *context.Context) { |
|
|
|
storage.MinioCopyAFile(bucketName, srcObjectName, bucketName, destObjectName) |
|
|
|
} |
|
|
|
} else { |
|
|
|
log.Info("obs copy..") |
|
|
|
bucketName := setting.Bucket |
|
|
|
if storage.ObsGetFilesSize(bucketName, []string{destObjectName}) > 0 { |
|
|
|
isExist = true |
|
|
|