Skip to content

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

fix: add download button to excel viewer

Marc Seitzeb65fa68b9cd
diff --git a/components/view/dataroom/dataroom-view.tsx b/components/view/dataroom/dataroom-view.tsx
index ebd26996..579e2d8f 100644
--- a/components/view/dataroom/dataroom-view.tsx
+++ b/components/view/dataroom/dataroom-view.tsx
@@ -310,6 +310,7 @@ export default function DataroomView({
brand={brand}
dataroomId={dataroom.id}
setDocumentData={setDocumentData}
+ allowDownload={link.allowDownload!}
/>
</div>
) : viewData.fileType === "sheet" && useAdvancedExcelViewer ? (
diff --git a/components/view/viewer/excel-viewer.tsx b/components/view/viewer/excel-viewer.tsx
index 376fe0b6..b71a017d 100644
--- a/components/view/viewer/excel-viewer.tsx
+++ b/components/view/viewer/excel-viewer.tsx
@@ -48,6 +48,7 @@ export default function ExcelViewer({
documentName,
versionNumber,
sheetData,
+ allowDownload,
brand,
dataroomId,
setDocumentData,
@@ -59,6 +60,7 @@ export default function ExcelViewer({
documentName: string;
versionNumber: number;
sheetData: SheetData[];
+ allowDownload: boolean;
brand?: Partial<Brand> | Partial<DataroomBrand> | null;
dataroomId?: string;
setDocumentData?: React.Dispatch<React.SetStateAction<TDocumentData | null>>;
@@ -226,6 +228,7 @@ export default function ExcelViewer({
setDocumentData={setDocumentData}
type="sheet"
isPreview={isPreview}
+ allowDownload={allowDownload}
/>
<div
style={{ height: "calc(100dvh - 64px)" }}
diff --git a/pages/api/links/download/bulk.ts b/pages/api/links/download/bulk.ts
index eabcc2bc..aebf77fa 100644
--- a/pages/api/links/download/bulk.ts
+++ b/pages/api/links/download/bulk.ts
@@ -15,7 +15,7 @@ export default async function handle(
res: NextApiResponse,
) {
if (req.method === "POST") {
- // GET /api/links/download/bulk
+ // POST /api/links/download/bulk
const { linkId, viewId } = req.body as { linkId: string; viewId: string };
try {