Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

fix cloudinary

Steven Tey0363766f618b
diff --git a/apps/web/lib/api/links.ts b/apps/web/lib/api/links.ts
index 2c073e5d01..cf249b9271 100644
--- a/apps/web/lib/api/links.ts
+++ b/apps/web/lib/api/links.ts
@@ -250,7 +250,8 @@ export async function processLink({
}
// custom social media image checks
- if (image && !process.env.CLOUDINARY_URL) {
+ const uploadedImage = image && image.startsWith("data:image") ? true : false;
+ if (uploadedImage && !process.env.CLOUDINARY_URL) {
return {
link: payload,
error: "Missing Cloudinary environment variable.",