附件上传组件改为单线程

This commit is contained in:
devil_gong 2019-06-26 18:38:06 +08:00
parent 5443d13fa3
commit 0290d00f9a
4 changed files with 11 additions and 2 deletions

View File

@ -107,6 +107,12 @@ class Uploader
*/
private function uploadFile()
{
if(empty($_FILES[$this->fileField]))
{
$this->stateInfo = $this->getStateInfo("ERROR_SIZE_EXCEED");
return;
}
$file = $this->file = $_FILES[$this->fileField];
if (!$file) {
$this->stateInfo = $this->getStateInfo("ERROR_FILE_NOT_FOUND");

View File

@ -176,7 +176,8 @@
fileVal: editor.getOpt('fileFieldName'),
duplicate: true,
fileSingleSizeLimit: fileMaxSize,
compress: false
compress: false,
threads: 1
});
uploader.addButton({
id: '#filePickerBlock'

View File

@ -348,6 +348,7 @@
server: actionUrl,
fileVal: editor.getOpt('imageFieldName'),
duplicate: true,
threads: 1,
fileSingleSizeLimit: imageMaxSize, // 默认 2 M
compress: editor.getOpt('imageCompressEnable') ? {
width: imageCompressBorder,

View File

@ -625,7 +625,8 @@
fileVal: editor.getOpt('videoFieldName'),
duplicate: true,
fileSingleSizeLimit: fileMaxSize,
compress: false
compress: false,
threads: 1
});
uploader.addButton({
id: '#filePickerBlock'