Commit 86391c6e by zhangleyuan

feat:修改上传视频文件的大小

parent 098702ff
...@@ -448,7 +448,7 @@ class FolderList extends React.Component { ...@@ -448,7 +448,7 @@ class FolderList extends React.Component {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) { if (type.indexOf('video') > -1 && size > 2048 * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
......
...@@ -135,7 +135,7 @@ class OperateArea extends React.Component { ...@@ -135,7 +135,7 @@ class OperateArea extends React.Component {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) { if (type.indexOf('video') > -1 && size > 2048 * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
......
...@@ -336,18 +336,6 @@ class SelectPrepareFileModal extends React.Component { ...@@ -336,18 +336,6 @@ class SelectPrepareFileModal extends React.Component {
if (!type) { if (!type) {
type = getFileTypeByName(name); 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) { if (supportFileType.indexOf(type) > -1 && size > FileVerifyMap[type].maxSize * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
......
...@@ -484,7 +484,7 @@ class FolderList extends React.Component { ...@@ -484,7 +484,7 @@ class FolderList extends React.Component {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
if (type.indexOf('video') > -1 && size > 500 * DEFAULT_SIZE_UNIT) { if (type.indexOf('video') > -1 && size > 2048 * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
......
...@@ -125,18 +125,6 @@ class OperateArea extends React.Component { ...@@ -125,18 +125,6 @@ class OperateArea extends React.Component {
if (!type) { if (!type) {
type = getFileTypeByName(name); 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) { if (localFileTypeMap.indexOf(type) > -1 && size > FileVerifyMap[type].maxSize * DEFAULT_SIZE_UNIT) {
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _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