diff --git a/pkg/internal/services/uploader.go b/pkg/internal/services/uploader.go index aab5b1f..f76a05f 100644 --- a/pkg/internal/services/uploader.go +++ b/pkg/internal/services/uploader.go @@ -36,12 +36,9 @@ func UploadFileToTemporary(ctx *fiber.Ctx, file *multipart.FileHeader, meta mode } func ReUploadFile(meta models.Attachment, dst int) error { - if dst == models.AttachmentDstTemporary || meta.Destination == dst { + if meta.Destination == dst { return fmt.Errorf("destnation cannot be reversed temporary or the same as the original") } - if meta.Destination != models.AttachmentDstTemporary { - return fmt.Errorf("attachment isn't in temporary storage, unable to process") - } prevDst := meta.Destination inDst, err := fs.DownloadFileToLocal(meta, prevDst)