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