From 5fc157a11e0c4d1cd1aa0a438932060aa1102b80 Mon Sep 17 00:00:00 2001 From: songyih Date: Sun, 31 Jan 2021 18:14:13 -0800 Subject: [PATCH] add x-zip-compressed file type check for model upload --- src/components/MenuBar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MenuBar.js b/src/components/MenuBar.js index 1a1f752..d57a724 100644 --- a/src/components/MenuBar.js +++ b/src/components/MenuBar.js @@ -145,8 +145,8 @@ function MenuBar (props) { }); return ; } - - if (uploadRef.current.state.fileList[0].raw.type !== "application/zip") { + console.log('upload', uploadRef.current); + if (!["application/zip", "application/x-zip-compressed"].includes(uploadRef.current.state.fileList[0].raw.type)) { Message({ message: "Only zip file can be uploaded", type: "warning",