Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix: truncate long file names for better ui display (#1185)

JeevaRamanathan5f051d1fab8e
diff --git a/components/document-upload.tsx b/components/document-upload.tsx
index 3ca451a6..d56b279a 100644
--- a/components/document-upload.tsx
+++ b/components/document-upload.tsx
@@ -141,6 +141,7 @@ export default function DocumentUpload({
}}
/>
) : null}
+
<div className="text-center">
{currentFile ? (
<div className="flex flex-col items-center text-foreground sm:flex-row sm:space-x-2">
@@ -150,7 +151,9 @@ export default function DocumentUpload({
isLight,
})}
</div>
- <p>{currentFile.name}</p>
+ <p className="max-w-[280px] truncate">
+ {(currentFile.name)}
+ </p>
<p className="text-gray-500">{bytesToSize(currentFile.size)}</p>
</div>
) : (