From 79e9f0da10f61dbf0c600eba4048941adcccc355 Mon Sep 17 00:00:00 2001 From: chenyifan01 Date: Tue, 8 Mar 2022 11:11:48 +0800 Subject: [PATCH] #1352 fix bug --- routers/repo/attachment.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routers/repo/attachment.go b/routers/repo/attachment.go index bc843c555..9de16ba2d 100755 --- a/routers/repo/attachment.go +++ b/routers/repo/attachment.go @@ -512,6 +512,10 @@ func GetSuccessChunks(ctx *context.Context) { return } } else { + oldAttachment, _ := models.GetAttachmentByUUID(fileChunk.UUID) + if oldAttachment != nil { + fileName = oldAttachment.Name + } isExist, err = storage.ObsHasObject(setting.BasePath + models.AttachmentRelativePath(fileChunk.UUID) + "/" + fileName) if err != nil { ctx.ServerError("ObsHasObject failed", err)