Browse Source

#1352

fix bug
tags/V1.22.3.1^2
chenyifan01 4 years ago
parent
commit
281cafaa9f
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      routers/repo/attachment.go

+ 3
- 2
routers/repo/attachment.go View File

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


Loading…
Cancel
Save