From 881eb6515a78a25b1b078b0144405602d57fc597 Mon Sep 17 00:00:00 2001 From: Monta Date: Mon, 22 Jul 2024 14:41:34 +0100 Subject: [PATCH] fix: download zip --- .../node/src/services/documents/web/controllers/documents.ts | 2 +- .../frontend/src/app/features/drive/hooks/use-drive-actions.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tdrive/backend/node/src/services/documents/web/controllers/documents.ts b/tdrive/backend/node/src/services/documents/web/controllers/documents.ts index 53c45eeb..f2f719ab 100644 --- a/tdrive/backend/node/src/services/documents/web/controllers/documents.ts +++ b/tdrive/backend/node/src/services/documents/web/controllers/documents.ts @@ -479,7 +479,7 @@ export class DocumentsController { ids = items.children.map(item => item.id); } - if (isDirectory) { + if (isDirectory === true) { const items = await globalResolver.services.documents.documents.get(ids[0], context, true); ids = items.children.map(item => item.id); } diff --git a/tdrive/frontend/src/app/features/drive/hooks/use-drive-actions.tsx b/tdrive/frontend/src/app/features/drive/hooks/use-drive-actions.tsx index ba776e04..f56c794e 100644 --- a/tdrive/frontend/src/app/features/drive/hooks/use-drive-actions.tsx +++ b/tdrive/frontend/src/app/features/drive/hooks/use-drive-actions.tsx @@ -99,7 +99,7 @@ export const useDriveActions = () => { ); const downloadZip = useCallback( - async (ids: string[], isDirectory?: boolean) => { + async (ids: string[], isDirectory = false) => { try { const url = await DriveApiClient.getDownloadZipUrl(companyId, ids, isDirectory); (window as any).open(url, '_blank').focus();