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.

added proper error message for file size too big

Steven Teycf38bee9e80b
diff --git a/components/app/projects/upload-logo.tsx b/components/app/projects/upload-logo.tsx
index 5b7a95ee73..3258a16196 100644
--- a/components/app/projects/upload-logo.tsx
+++ b/components/app/projects/upload-logo.tsx
@@ -55,6 +55,8 @@ export default function UploadLogo() {
mutate(`/api/projects`);
mutate(`/api/projects/${slug}`);
toast.success("Succesfully uploaded project logo!");
+ } else if (res.status === 413) {
+ toast.error("File size too big (max 2MB)");
} else {
toast.error("Something went wrong");
}