From 1abcfb827deac1eae5ece1284308c3346de1f36b Mon Sep 17 00:00:00 2001 From: unknown <18119604035@163.com> Date: Fri, 28 Jul 2023 17:25:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=BA=90=E8=AF=BE=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../upload-courseware-button/index.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/compenents/upload-courseware-button/index.tsx b/src/compenents/upload-courseware-button/index.tsx index e376a5b..de9e417 100644 --- a/src/compenents/upload-courseware-button/index.tsx +++ b/src/compenents/upload-courseware-button/index.tsx @@ -60,8 +60,6 @@ export const UploadCoursewareButton = (props: PropsInterface) => { beforeUpload: async (file: File) => { let extension: any = file.name.split("."); extension = extension[extension.length - 1]; - console.log(extension); - console.log(file.type); if ( file.type === "application/vnd.openxmlformats-officedocument.wordprocessingml.document" || @@ -71,7 +69,7 @@ export const UploadCoursewareButton = (props: PropsInterface) => { file.type === "text/plain" || file.type === "application/pdf" || file.type === "application/x-zip-compressed" || - file.type === "application/zip" || + file.type === "application/octet-stream" || file.type === "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" || file.type === "application/vnd.ms-excel" || @@ -81,7 +79,17 @@ export const UploadCoursewareButton = (props: PropsInterface) => { file.type === "application/vnd.ms-excel.template.macroEnabled.12" || file.type === "application/vnd.ms-excel.addin.macroEnabled.12" || file.type === "application/vnd.ms-excel.sheet.binary.macroEnabled.12" || - file.type === "application/vnd.ms-powerpoint" + file.type === "application/vnd.ms-powerpoint" || + file.type === + "application/vnd.openxmlformats-officedocument.presentationml.presentation" || + file.type === + "application/vnd.openxmlformats-officedocument.presentationml.template" || + file.type === + "application/vnd.openxmlformats-officedocument.presentationml.slideshow" || + file.type === "application/vnd.ms-powerpoint.addin.macroEnabled.12" || + file.type === + "application/vnd.ms-powerpoint.presentation.macroEnabled.12" || + file.type === "application/vnd.ms-powerpoint.slideshow.macroEnabled.12" ) { // 添加到本地待上传 let data = await getMinioUploadId(extension);