Commit 1a26589e by wufan

Merge branch 'feature/zhangleyuan/20210304/video-size' into 'master'

Feature/zhangleyuan/20210304/video size

See merge request !9
parents 84a5bcb6 cb3b1aa6
......@@ -57,7 +57,7 @@ class NonCompliantFileModal extends React.Component {
<div className="tips">
<span className="icon iconfont">&#xe6f2;</span>
<span className="tips__text">
支持上传:Word(100M以内)、Excel(10M以内)、PPT(100M以内)、PDF(100M以内)、图片(5M以内)、音频(20M以内)、视频(500M以内)
支持上传:Word(100M以内)、Excel(10M以内)、PPT(100M以内)、PDF(100M以内)、图片(5M以内)、音频(20M以内)、视频(2G以内)
</span>
</div>
</Modal>
......
......@@ -4,9 +4,9 @@
* @Last Modified by: 吴文洁
* @Last Modified time: 2020-07-16 11:32:50
*/
const DEFAULT_SIZE_UNIT = 1024 * 1024; // 将B转换成M
const DEFAULT_SIZE_UNIT = 1000 * 1000; // 将B转换成M
const GIGABYTE_SIZE_UNIT = 1024 * 1024 * 1024; // 转换为G
const GIGABYTE_SIZE_UNIT = 1000 * 1000 * 1000; // 转换为G
const SupportFileType = [
"application/msword",
......@@ -106,11 +106,11 @@ const FileVerifyMap = {
},
"audio/mp4": {
type: "MP4",
maxSize: 500
maxSize: 2000
},
"video/mp4": {
type: "MP4",
maxSize: 500
maxSize: 2000
}
};
......
......@@ -2,11 +2,11 @@
* @Author: 吴文洁
* @Date: 2020-07-23 17:11:49
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-18 17:54:36
* @LastEditTime: 2021-03-04 17:16:01
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
const DEFAULT_SIZE_UNIT = 1024 * 1024; // 将B转换成M
const DEFAULT_SIZE_UNIT = 1000 * 1000; // 将B转换成M
const SupportFileType = [
"application/msword",
......
......@@ -2,11 +2,11 @@
* @Author: 吴文洁
* @Date: 2020-08-20 09:21:40
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-31 10:39:16
* @LastEditTime: 2021-03-04 17:16:30
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
const DEFAULT_SIZE_UNIT: number = 1024 * 1024; // 将B转换成M
const DEFAULT_SIZE_UNIT: number = 1000 * 1000; // 将B转换成M
const SUFFIX_MAP: {
[key: string]: string
......@@ -139,11 +139,11 @@ const FILR_VERIFY_MAP = {
},
"audio/mp4": {
type: "MP4",
maxSize: 500
maxSize: 2000
},
"video/mp4": {
type: "MP4",
maxSize: 500
maxSize: 2000
}
};
......
......@@ -244,7 +244,7 @@ class AddLiveIntro extends React.Component {
}}>上传图片/视频</Button>
<div className="tips">
<div>建议尺寸1280*720px或16:9。图片最大5M,支持jpg、jpeg和png;视频最大500M</div>
<div>建议尺寸1280*720px或16:9。图片最大5M,支持jpg、jpeg和png;视频最大2G</div>
<div>支持mp4。</div>
</div>
......
......@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-05 10:07:47
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-02-04 16:41:05
* @LastEditTime: 2021-03-04 10:26:07
* @Description: 视频课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
......@@ -475,7 +475,7 @@ class AddVideoCourse extends React.Component {
}}
>{`${(pageType === 'add' && !scheduleVideoId) ? '选择' : '更换'}视频`}</Button>
<span className="tips">视频数量限制1个,大小不超过500M</span>
<span className="tips">视频数量限制1个,大小不超过2G</span>
</div>
</div>
......@@ -546,9 +546,9 @@ class AddVideoCourse extends React.Component {
accept="video/mp4"
confirm={{
title: '文件过大,无法上传',
content: '为保障学员的观看体验,上传的视频大小不能超过500M',
content: '为保障学员的观看体验,上传的视频大小不能超过2G',
}}
tooltip={'格式支持mp4,大小不超过500M'}
tooltip={'格式支持mp4,大小不超过2G'}
isOpen={showSelectFileModal}
diskList={diskList}
addVideo={true}
......
......@@ -448,7 +448,7 @@ class FolderList extends React.Component {
nonCompliantFileList.push(file);
_fileList.splice(index, 1);
}
if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) {
if (type.indexOf('video') > -1 && size > 2000 * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file);
_fileList.splice(index, 1);
}
......
......@@ -135,7 +135,7 @@ class OperateArea extends React.Component {
nonCompliantFileList.push(file);
_fileList.splice(index, 1);
}
if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) {
if (type.indexOf('video') > -1 && size > 2000 * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file);
_fileList.splice(index, 1);
}
......
......@@ -57,7 +57,7 @@ class NonCompliantFileModal extends React.Component {
<div className="tips">
<span className="icon iconfont">&#xe6f2;</span>
<span className="tips__text">
支持上传:Word(100M以内)、Excel(10M以内)、PPT(100M以内)、PDF(100M以内)、图片(5M以内)、音频(20M以内)、视频(500M以内)
支持上传:Word(100M以内)、Excel(10M以内)、PPT(100M以内)、PDF(100M以内)、图片(5M以内)、音频(20M以内)、视频(2G以内)
</span>
</div>
</Modal>
......
......@@ -336,18 +336,6 @@ class SelectPrepareFileModal extends React.Component {
if (!type) {
type = getFileTypeByName(name);
}
// if (type.indexOf('image') > -1 && size > 5 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
// if (type.indexOf('audio') > -1 && size > 20 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
// if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
if (supportFileType.indexOf(type) > -1 && size > FileVerifyMap[type].maxSize * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file);
_fileList.splice(index, 1);
......
......@@ -484,7 +484,7 @@ class FolderList extends React.Component {
nonCompliantFileList.push(file);
_fileList.splice(index, 1);
}
if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) {
if (type.indexOf('video') > -1 && size > 2000 * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file);
_fileList.splice(index, 1);
}
......
......@@ -125,18 +125,6 @@ class OperateArea extends React.Component {
if (!type) {
type = getFileTypeByName(name);
}
// if (type.indexOf('image') > -1 && size > 50 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
// if (type.indexOf('audio') > -1 && size > 50 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
// if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) {
// nonCompliantFileList.push(file);
// _fileList.splice(index, 1);
// }
if (localFileTypeMap.indexOf(type) > -1 && size > FileVerifyMap[type].maxSize * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file);
_fileList.splice(index, 1);
......
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