|
|
|
@@ -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 |
|
|
|
|