diff --git a/modules/editor/editor.model.php b/modules/editor/editor.model.php index 8f35c773a..2db3dad80 100644 --- a/modules/editor/editor.model.php +++ b/modules/editor/editor.model.php @@ -305,6 +305,10 @@ 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; + if (PHP_INT_SIZE < 8) + { + $file_config->allowed_filesize = min($file_config->allowed_filesize, 2147483647); + } $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) { diff --git a/modules/editor/skins/ckeditor/file_upload.html b/modules/editor/skins/ckeditor/file_upload.html index 918b6b69d..9adadffce 100644 --- a/modules/editor/skins/ckeditor/file_upload.html +++ b/modules/editor/skins/ckeditor/file_upload.html @@ -55,7 +55,7 @@ jQuery(function($){ // uploader var setting = { - maxFileSize: {$file_config->allowed_filesize}, + maxFileSize: {$logged_info->is_admin === 'Y' ? 0 : $file_config->allowed_filesize}, maxChunkSize: {$file_config->allowed_chunk_size}, singleFileUploads: true }; diff --git a/modules/file/file.admin.controller.php b/modules/file/file.admin.controller.php index 31fc03b7e..942f19492 100644 --- a/modules/file/file.admin.controller.php +++ b/modules/file/file.admin.controller.php @@ -144,6 +144,13 @@ class fileAdminController extends file if($userFileAllowSize > $iniMinSzie || $userAttachAllowSize > $iniMinSzie) return new Object(-1, 'input size over than config in php.ini'); */ + if (PHP_INT_SIZE < 8) + { + if ($file_config->allowed_filesize > 2047 || $file_config->allowed_attach_size > 2047) + { + return new Object(-1, 'msg_32bit_max_2047mb'); + } + } $oModuleController = getController('module'); for($i=0;$ienable_download_group = 'Downloadable Groups'; $lang->about_allow_outlink = 'You can block external links according to referers(except media files like *.wmv and *.mp3).'; $lang->about_allow_outlink_format = 'These formats will always be allowed. Please use comma(,) for multiple input. eg)hwp,doc,zip,pdf'; $lang->about_allow_outlink_site = 'These websites will alyways be allowed. Please use new line for multiple input. ex)https://www.rhymix.org/'; -$lang->about_allowed_filesize = 'You can assign file size limit for each file.(Exclude administrators)'; -$lang->about_allowed_attach_size = 'You can assign file size limit for each document.(Exclude administrators)'; +$lang->about_allowed_filesize = 'You can limit the size of each attached file. Administrators are exempt.'; +$lang->about_allowed_attach_size = 'You can limit the total size of all attached files in one document. Administrators are exempt.'; +$lang->about_allowed_size_limits = 'The file size will be limited to the value set in php.ini (%sB) in IE9 and below and older Android browsers.'; $lang->about_allowed_filetypes = 'To allow an extension, use "*.[extention]". To allow multiple extensions, use ";" between each extension. ex) *.* or *.jpg;*.gif; '; $lang->cmd_delete_checked_file = 'Delete Selected Item(s)'; $lang->cmd_move_to_document = 'Move to Document'; @@ -45,6 +46,7 @@ $lang->msg_not_allowed_outlink = 'It is not allowed to download files from sites $lang->msg_not_permitted_create = 'Failed to create a file or directory.'; $lang->msg_file_upload_error = 'An error has occurred during uploading.'; $lang->msg_upload_invalid_chunk = 'An error has occurred during chunked uploading.'; +$lang->msg_32bit_max_2047mb = 'On 32-bit servers, the file size limit cannot exceed 2047MB.'; $lang->no_files = 'No Files'; $lang->file_manager = 'Manage selected files'; $lang->selected_file = 'Selected files'; diff --git a/modules/file/lang/ko.php b/modules/file/lang/ko.php index 541f392b1..b8a0fb24b 100644 --- a/modules/file/lang/ko.php +++ b/modules/file/lang/ko.php @@ -18,8 +18,9 @@ $lang->enable_download_group = '다운로드 가능 그룹'; $lang->about_allow_outlink = '리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다.(*.wmv, *.mp3등 미디어 파일 제외)'; $lang->about_allow_outlink_format = '파일 외부 링크 설정에 상관없이 허용하는 파일 확장자입니다. 여러 개 입력 시에 쉼표(,)을 이용해서 구분해주세요. 예)hwp,doc,zip,pdf'; $lang->about_allow_outlink_site = '파일 외부 링크 설정에 상관없이 허용하는 사이트 주소입니다. 여러 개 입력 시에 줄을 바꿔서 구분해주세요. 예)https://www.rhymix.org/'; -$lang->about_allowed_filesize = '하나의 파일에 대해 최고 용량을 지정할 수 있습니다.(관리자는 제외)'; -$lang->about_allowed_attach_size = '하나의 문서에 첨부할 수 있는 최고 용량을 지정할 수 있습니다.(관리자는 제외)'; +$lang->about_allowed_filesize = '각 파일의 용량을 제한할 수 있습니다. 관리자에게는 적용되지 않습니다.'; +$lang->about_allowed_attach_size = '하나의 문서에 첨부할 수 있는 최대 용량을 제한할 수 있습니다. 관리자에게는 적용되지 않습니다.'; +$lang->about_allowed_size_limits = 'IE9 이하, 구버전 안드로이드 등에서는 php.ini에서 지정한 %sB로 제한됩니다.'; $lang->about_allowed_filetypes = '"*.확장자"로 지정할 수 있고 ";" 으로 여러 개 지정이 가능합니다. 예) *.* or *.jpg;*.gif;'; $lang->cmd_delete_checked_file = '선택항목 삭제'; $lang->cmd_move_to_document = '문서로 이동'; @@ -46,6 +47,7 @@ $lang->msg_not_allowed_outlink = '외부링크에서 다운로드할 수 없습 $lang->msg_not_permitted_create = '파일 또는 디렉터리를 생성할 수 없습니다.'; $lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.'; $lang->msg_upload_invalid_chunk = '분할 업로드 처리 중 오류가 발생하였습니다.'; +$lang->msg_32bit_max_2047mb = '32비트 서버에서는 파일 크기 제한이 2047MB를 초과할 수 없습니다.'; $lang->no_files = '파일이 없습니다.'; $lang->file_manager = '선택한 파일 관리'; $lang->selected_file = '선택한 파일'; diff --git a/modules/file/tpl/file_module_config.html b/modules/file/tpl/file_module_config.html index 8d80eb05a..64fb9e2c8 100644 --- a/modules/file/tpl/file_module_config.html +++ b/modules/file/tpl/file_module_config.html @@ -11,21 +11,21 @@
MB -

{$lang->about_allowed_filesize}

+

{$lang->about_allowed_filesize}
{sprintf($lang->about_allowed_size_limits, ini_get('upload_max_filesize'))}

MB -

{$lang->about_allowed_attach_size}

+

{$lang->about_allowed_attach_size}
{sprintf($lang->about_allowed_size_limits, ini_get('upload_max_filesize'))}

-

{$lang->about_allowed_filetypes}

+

{$lang->about_allowed_filetypes}