mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Add chunk size setting to editor/uploader
This commit is contained in:
parent
d34ef5901f
commit
ef27f8c0c4
2 changed files with 3 additions and 1 deletions
|
|
@ -305,6 +305,8 @@ class editorModel extends editor
|
|||
$file_config = $oFileModel->getUploadConfig();
|
||||
$file_config->allowed_attach_size = $file_config->allowed_attach_size*1024*1024;
|
||||
$file_config->allowed_filesize = $file_config->allowed_filesize*1024*1024;
|
||||
$file_config->allowed_chunk_size = min(FileHandler::returnBytes(ini_get('upload_max_filesize')), FileHandler::returnBytes(ini_get('post_max_size')) * 0.95, 100 * 1024 * 1024);
|
||||
$file_config->allowed_chunk_size = floor($file_config->allowed_chunk_size / 131072) * 131072;
|
||||
|
||||
Context::set('file_config',$file_config);
|
||||
// Configure upload status such as file size
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
// uploader
|
||||
var setting = {
|
||||
maxFileSize: {$file_config->allowed_filesize},
|
||||
maxChunkSize: 0,
|
||||
maxChunkSize: {$file_config->allowed_chunk_size},
|
||||
singleFileUploads: true
|
||||
};
|
||||
$container = $('#xefu-container-{$editor_sequence}');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue