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