From 317af060f784c561ba4d5c330e88ff2ccc626899 Mon Sep 17 00:00:00 2001 From: nk-coding Date: Sun, 23 Oct 2022 08:18:35 +0200 Subject: [PATCH 1/2] fix csv upload: accept correct content type --- client/src/components/UploadFileButton.tsx | 8 ++------ .../import-csv/components/ImportCSVFromFile.tsx | 3 +-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/client/src/components/UploadFileButton.tsx b/client/src/components/UploadFileButton.tsx index 39ec8e258..41551e931 100644 --- a/client/src/components/UploadFileButton.tsx +++ b/client/src/components/UploadFileButton.tsx @@ -39,10 +39,6 @@ function UploadFileButton({ async (file: File) => { setLoading(true); - if (!supportedFileTypes.includes(file.type)) { - return; - } - const content: string = await file.text(); const cb = onFileSelect(content, file); @@ -50,7 +46,7 @@ function UploadFileButton({ setLoading(false); }, - [supportedFileTypes, onFileSelect] + [onFileSelect] ); const handleFileUpload = useCallback( @@ -77,7 +73,7 @@ function UploadFileButton({ > onFileInfoChanged({ content, fileName: file.name }) } From 531c264b1c6e62e01808482e8d7b80ee1c2f7a3d Mon Sep 17 00:00:00 2001 From: nk-coding Date: Sun, 23 Oct 2022 09:14:37 +0200 Subject: [PATCH 2/2] format --- client/src/components/UploadFileButton.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/UploadFileButton.tsx b/client/src/components/UploadFileButton.tsx index 41551e931..2ccd5bf6b 100644 --- a/client/src/components/UploadFileButton.tsx +++ b/client/src/components/UploadFileButton.tsx @@ -73,7 +73,7 @@ function UploadFileButton({ >