mirror of
https://github.com/PlayEdu/backend
synced 2025-07-18 06:57:28 +08:00
资源课件上传组件
This commit is contained in:
parent
1abcfb827d
commit
7a31519501
@ -60,6 +60,7 @@ export const UploadCoursewareButton = (props: PropsInterface) => {
|
||||
beforeUpload: async (file: File) => {
|
||||
let extension: any = file.name.split(".");
|
||||
extension = extension[extension.length - 1];
|
||||
console.log(file.type);
|
||||
if (
|
||||
file.type ===
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" ||
|
||||
@ -70,6 +71,7 @@ export const UploadCoursewareButton = (props: PropsInterface) => {
|
||||
file.type === "application/pdf" ||
|
||||
file.type === "application/x-zip-compressed" ||
|
||||
file.type === "application/octet-stream" ||
|
||||
file.type === "application/zip" ||
|
||||
file.type ===
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
|
||||
file.type === "application/vnd.ms-excel" ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user