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)