Commit ee9d6bad by zhangleyuan

feat:处理上传文件没有过滤的问题

parent a7e8ab1e
/*
* @Author: 吴文洁
* @Date: 2020-08-05 10:07:47
* @LastEditors: yuananting
* @LastEditTime: 2021-07-15 20:23:12
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-16 13:57:33
* @Description: 线上课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
......@@ -338,7 +338,7 @@ class AddVideoCourse extends React.Component {
courseChapterList: _courseChapterList
})
}
}else{
}else if( folderFormat==="WORD" || folderFormat==="PDF"){
let _mediaName = folderName;
if(folderFormat === 'PDF'){
_mediaName = folderName.replace('.pdf','')
......
......@@ -325,14 +325,12 @@ class SelectPrepareFileModal extends React.Component {
// 上传文件
handleUpload = (event) => {
const { selectType } = this.props;
const fileList = event.target.files;
// 判断文件的大小是否超出了限制
const nonCompliantFileList = [];
const _fileList = [...fileList];
_fileList.map((file, index) => {
console.log('file',file);
let { size, type, name } = file;
if (!type) {
type = getFileTypeByName(name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment