#1622 修复bug-1352

Merged
lewis merged 2 commits from fix-1352 into V20220314 2 years ago
  1. +6
    -1
      routers/repo/attachment.go

+ 6
- 1
routers/repo/attachment.go View File

@@ -512,7 +512,12 @@ func GetSuccessChunks(ctx *context.Context) {
return
}
} else {
isExist, err = storage.ObsHasObject(setting.BasePath + models.AttachmentRelativePath(fileChunk.UUID) + "/" + fileName)
oldFileName := fileName
oldAttachment, _ := models.GetAttachmentByUUID(fileChunk.UUID)
if oldAttachment != nil {
oldFileName = oldAttachment.Name
}
isExist, err = storage.ObsHasObject(setting.BasePath + models.AttachmentRelativePath(fileChunk.UUID) + "/" + oldFileName)
if err != nil {
ctx.ServerError("ObsHasObject failed", err)
return


Loading…
Cancel
Save