From e476be5e415765d4c26917cf5d9369c15306e284 Mon Sep 17 00:00:00 2001 From: Made Baruna Date: Tue, 6 Jul 2021 20:14:45 +0700 Subject: [PATCH] Check other excel mime type --- src/routes/wish/_excelImport.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/routes/wish/_excelImport.svelte b/src/routes/wish/_excelImport.svelte index f799fdbd..56e59ea2 100644 --- a/src/routes/wish/_excelImport.svelte +++ b/src/routes/wish/_excelImport.svelte @@ -300,7 +300,10 @@ function checkFile(file) { console.log(file.type); - if (file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') { + if ( + file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || + file.type === 'application/wps-office.xlsx' + ) { readExcel(file); } else { pushToast($t('wish.excel.errorInvalidFile'), 'error'); @@ -349,7 +352,6 @@ }; reader.readAsArrayBuffer(file); }); -
@@ -434,5 +436,4 @@ @apply text-background; } } -