Skip to content

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

fix document view

Marc Seitz2f1b960d5f8c
diff --git a/pages/view/[linkId].tsx b/pages/view/[linkId].tsx
index 48628e66..4fab0e20 100644
--- a/pages/view/[linkId].tsx
+++ b/pages/view/[linkId].tsx
@@ -58,6 +58,19 @@ const DocumentView = ({
</div>
);
}
+
+ if (
+ document.file.includes(".png") ||
+ document.file.includes(".jpeg") ||
+ document.file.includes(".gif") ||
+ document.file.includes(".jpg")
+ ) {
+ return (
+ <div className="h-screen bg-gray-900">
+ <img className="w-full h-full" src={document.file} />
+ </div>
+ );
+ }
return (
<div className="h-screen bg-gray-900">
<iframe