diff --git a/pkg/internal/services/uploader.go b/pkg/internal/services/uploader.go index 2343a79..5a2f722 100644 --- a/pkg/internal/services/uploader.go +++ b/pkg/internal/services/uploader.go @@ -95,7 +95,7 @@ func CheckChunkExistsInTemporary(meta models.Attachment, cid string) bool { } func ReUploadFileToPermanent(meta models.Attachment, dst int) error { - if dst == models.AttachmentDstTemporary || meta.Destination != dst { + if dst == models.AttachmentDstTemporary || meta.Destination == dst { return fmt.Errorf("destnation cannot be reversed temporary or the same as the original") } if meta.Destination != models.AttachmentDstTemporary {