Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

bug fix

daniel31x139d17600124bb
diff --git a/pages/api/v1/archives/[linkId].ts b/pages/api/v1/archives/[linkId].ts
index 435ee3be..344c6914 100644
--- a/pages/api/v1/archives/[linkId].ts
+++ b/pages/api/v1/archives/[linkId].ts
@@ -183,8 +183,7 @@ async function handlePost(req: NextApiRequest, res: NextApiResponse) {
// Ensure if the png already exists, the user is not trying to upload a jpeg (and vice versa)
if (
- (((link.image?.endsWith("jpeg") || link.image?.endsWith("png")) &&
- format === ArchivedFormat.png) ||
+ ((link.image?.endsWith("jpeg") && format === ArchivedFormat.png) ||
(link.image?.endsWith("png") && format === ArchivedFormat.jpeg)) &&
!isPreview
) {