Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
25647536
Commit
25647536
authored
Mar 04, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理上传视频大小的限制
parent
86391c6e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
13 deletions
+13
-13
src/common/constants/academic/lessonEnum.js
+4
-4
src/common/constants/academic/liveEnum.js
+2
-2
src/domains/resource-disk/constants.ts
+4
-4
src/modules/prepare-lesson/components/FolderList.jsx
+1
-1
src/modules/prepare-lesson/components/OperateArea.jsx
+1
-1
src/modules/resource-disk/components/FolderList.jsx
+1
-1
No files found.
src/common/constants/academic/lessonEnum.js
View file @
25647536
...
...
@@ -4,9 +4,9 @@
* @Last Modified by: 吴文洁
* @Last Modified time: 2020-07-16 11:32:50
*/
const
DEFAULT_SIZE_UNIT
=
10
24
*
1024
;
// 将B转换成M
const
DEFAULT_SIZE_UNIT
=
10
00
*
1000
;
// 将B转换成M
const
GIGABYTE_SIZE_UNIT
=
10
24
*
1024
*
1024
;
// 转换为G
const
GIGABYTE_SIZE_UNIT
=
10
00
*
1000
*
1000
;
// 转换为G
const
SupportFileType
=
[
"application/msword"
,
...
...
@@ -106,11 +106,11 @@ const FileVerifyMap = {
},
"audio/mp4"
:
{
type
:
"MP4"
,
maxSize
:
20
48
maxSize
:
20
00
},
"video/mp4"
:
{
type
:
"MP4"
,
maxSize
:
20
48
maxSize
:
20
00
}
};
...
...
src/common/constants/academic/liveEnum.js
View file @
25647536
...
...
@@ -2,11 +2,11 @@
* @Author: 吴文洁
* @Date: 2020-07-23 17:11:49
* @LastEditors: zhangleyuan
* @LastEditTime: 202
0-12-18 17:54:36
* @LastEditTime: 202
1-03-04 17:16:01
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
const
DEFAULT_SIZE_UNIT
=
10
24
*
1024
;
// 将B转换成M
const
DEFAULT_SIZE_UNIT
=
10
00
*
1000
;
// 将B转换成M
const
SupportFileType
=
[
"application/msword"
,
...
...
src/domains/resource-disk/constants.ts
View file @
25647536
...
...
@@ -2,11 +2,11 @@
* @Author: 吴文洁
* @Date: 2020-08-20 09:21:40
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-04 1
0:22:07
* @LastEditTime: 2021-03-04 1
7:16:30
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
const
DEFAULT_SIZE_UNIT
:
number
=
10
24
*
1024
;
// 将B转换成M
const
DEFAULT_SIZE_UNIT
:
number
=
10
00
*
1000
;
// 将B转换成M
const
SUFFIX_MAP
:
{
[
key
:
string
]:
string
...
...
@@ -139,11 +139,11 @@ const FILR_VERIFY_MAP = {
},
"audio/mp4"
:
{
type
:
"MP4"
,
maxSize
:
20
48
maxSize
:
20
00
},
"video/mp4"
:
{
type
:
"MP4"
,
maxSize
:
20
48
maxSize
:
20
00
}
};
...
...
src/modules/prepare-lesson/components/FolderList.jsx
View file @
25647536
...
...
@@ -448,7 +448,7 @@ class FolderList extends React.Component {
nonCompliantFileList
.
push
(
file
);
_fileList
.
splice
(
index
,
1
);
}
if
(
type
.
indexOf
(
'video'
)
>
-
1
&&
size
>
20
48
*
DEFAULT_SIZE_UNIT
)
{
if
(
type
.
indexOf
(
'video'
)
>
-
1
&&
size
>
20
00
*
DEFAULT_SIZE_UNIT
)
{
nonCompliantFileList
.
push
(
file
);
_fileList
.
splice
(
index
,
1
);
}
...
...
src/modules/prepare-lesson/components/OperateArea.jsx
View file @
25647536
...
...
@@ -135,7 +135,7 @@ class OperateArea extends React.Component {
nonCompliantFileList
.
push
(
file
);
_fileList
.
splice
(
index
,
1
);
}
if
(
type
.
indexOf
(
'video'
)
>
-
1
&&
size
>
20
48
*
DEFAULT_SIZE_UNIT
)
{
if
(
type
.
indexOf
(
'video'
)
>
-
1
&&
size
>
20
00
*
DEFAULT_SIZE_UNIT
)
{
nonCompliantFileList
.
push
(
file
);
_fileList
.
splice
(
index
,
1
);
}
...
...
src/modules/resource-disk/components/FolderList.jsx
View file @
25647536
...
...
@@ -484,7 +484,7 @@ class FolderList extends React.Component {
nonCompliantFileList
.
push
(
file
);
_fileList
.
splice
(
index
,
1
);
}
if
(
type
.
indexOf
(
'video'
)
>
-
1
&&
size
>
20
48
*
DEFAULT_SIZE_UNIT
)
{
if
(
type
.
indexOf
(
'video'
)
>
-
1
&&
size
>
20
00
*
DEFAULT_SIZE_UNIT
)
{
nonCompliantFileList
.
push
(
file
);
_fileList
.
splice
(
index
,
1
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment