mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
Improve debugging and error handling for chunked file uploads
This commit is contained in:
parent
193fab949d
commit
13b14dc7f5
5 changed files with 103 additions and 22 deletions
|
|
@ -305,8 +305,15 @@ 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;
|
||||
$file_config->allowed_chunk_size = min(FileHandler::returnBytes(ini_get('upload_max_filesize')), FileHandler::returnBytes(ini_get('post_max_size')) * 0.95, 64 * 1024 * 1024);
|
||||
if ($file_config->allowed_chunk_size > 4 * 1048576)
|
||||
{
|
||||
$file_config->allowed_chunk_size = floor($file_config->allowed_chunk_size / 1048576) * 1048576;
|
||||
}
|
||||
else
|
||||
{
|
||||
$file_config->allowed_chunk_size = floor($file_config->allowed_chunk_size / 65536) * 65536;
|
||||
}
|
||||
|
||||
Context::set('file_config',$file_config);
|
||||
// Configure upload status such as file size
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue