From 1e8a5359b78e28db7683ba837a962685446c6c32 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Thu, 19 Dec 2024 16:10:33 +0100 Subject: [PATCH] fix: allow additional file-type for oldmarr import (#1723) --- .../[locale]/init/_steps/import/import-dropzone.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/nextjs/src/app/[locale]/init/_steps/import/import-dropzone.tsx b/apps/nextjs/src/app/[locale]/init/_steps/import/import-dropzone.tsx index b425267cf..cea43cabe 100644 --- a/apps/nextjs/src/app/[locale]/init/_steps/import/import-dropzone.tsx +++ b/apps/nextjs/src/app/[locale]/init/_steps/import/import-dropzone.tsx @@ -24,10 +24,19 @@ export const ImportDropZone = ({ loading, updateFile }: ImportDropZoneProps) => }} acceptColor="blue.6" rejectColor="red.6" - accept={[MIME_TYPES.zip]} + accept={[MIME_TYPES.zip, "application/x-zip-compressed"]} loading={loading} multiple={false} maxSize={1024 * 1024 * 1024 * 64} // 64 MB + onReject={(rejections) => { + console.error( + "Rejected files", + rejections.map( + (rejection) => + `File: ${rejection.file.name} size=${rejection.file.size} fileType=${rejection.file.type}\n - ${rejection.errors.map((error) => error.message).join("\n - ")}`, + ), + ); + }} >