Browse Source

增加代码,解决Bug

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.11.2^2
zouap 3 years ago
parent
commit
0bbf7ae106
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      routers/repo/attachment.go

+ 10
- 0
routers/repo/attachment.go View File

@@ -630,6 +630,11 @@ func GetSuccessChunks(ctx *context.Context) {
isExist := false
if typeCloudBrain == models.TypeCloudBrainOne {
isExist, err = storage.Attachments.HasObject(getCloudOneMinioPrefix(scene, fileChunk))
if isExist {
log.Info("The file is exist in minio. has uploaded.")
} else {
log.Info("The file is not exist in minio..")
}
if err != nil {
ctx.ServerError("HasObject failed", err)
return
@@ -641,6 +646,11 @@ func GetSuccessChunks(ctx *context.Context) {
oldFileName = oldAttachment.Name
}
isExist, err = storage.ObsHasObject(getCloudTwoOBSPrefix(scene, fileChunk, oldFileName))
if isExist {
log.Info("The file is exist in obs. has uploaded.")
} else {
log.Info("The file is not exist in obs.")
}
if err != nil {
ctx.ServerError("ObsHasObject failed", err)
return


Loading…
Cancel
Save