diff --git a/modules/communication/communication.view.php b/modules/communication/communication.view.php
index 057b9bb87..a1458d11b 100644
--- a/modules/communication/communication.view.php
+++ b/modules/communication/communication.view.php
@@ -280,7 +280,7 @@ class CommunicationView extends communication
$option->primary_key_name = 'temp_srl';
$option->content_key_name = 'content';
$option->allow_fileupload = $this->config->enable_attachment === 'Y';
- $option->allowed_filesize = $this->config->attachment_size_limit ?? 0;
+ $option->allowed_filesize = ($this->config->attachment_size_limit ?? 0) * 1024;
$option->enable_autosave = FALSE;
$option->enable_default_component = TRUE; // FALSE;
$option->enable_component = FALSE;
diff --git a/modules/communication/tpl/index.html b/modules/communication/tpl/index.html
index 7b0c3b0c7..306b892a8 100644
--- a/modules/communication/tpl/index.html
+++ b/modules/communication/tpl/index.html
@@ -56,7 +56,7 @@
diff --git a/modules/editor/editor.model.php b/modules/editor/editor.model.php
index c0e71072c..2af47c429 100644
--- a/modules/editor/editor.model.php
+++ b/modules/editor/editor.model.php
@@ -232,8 +232,8 @@ class EditorModel extends Editor
$file_config->allowed_filesize = $file_config->allowed_filesize*1024*1024;
if (isset($option->allowed_filesize) && $option->allowed_filesize > 0)
{
- $file_config->allowed_attach_size = $option->allowed_filesize * 1024 * 1024;
- $file_config->allowed_filesize = $option->allowed_filesize * 1024 * 1024;
+ $file_config->allowed_attach_size = $option->allowed_filesize;
+ $file_config->allowed_filesize = $option->allowed_filesize;
}
// Calculate the appropriate chunk size.
@@ -267,9 +267,9 @@ class EditorModel extends Editor
{
$upload_config['allowed_filesize'] = $option->allowed_filesize;
}
- if (isset($option->allowed_filesize) && $option->allowed_filesize > 0)
+ if (isset($option->allowed_extensions) && !empty($option->allowed_extensions))
{
- $upload_config['allowed_filesize'] = $option->allowed_filesize;
+ $upload_config['allowed_extensions'] = $option->allowed_extensions;
}
FileController::setUploadInfo($option->editor_sequence, $upload_target_srl, $option->module_srl ?? 0, $upload_config);
diff --git a/modules/file/file.controller.php b/modules/file/file.controller.php
index 5a7eac804..de7dcce6b 100644
--- a/modules/file/file.controller.php
+++ b/modules/file/file.controller.php
@@ -92,7 +92,7 @@ class FileController extends File
{
if (isset($_SESSION['upload_info'][$editor_sequence]->allowed_filesize))
{
- $allowed_attach_size = $allowed_filesize = ($_SESSION['upload_info'][$editor_sequence]->allowed_filesize * 1024 * 1024);
+ $allowed_attach_size = $allowed_filesize = $_SESSION['upload_info'][$editor_sequence]->allowed_filesize;
}
else
{
@@ -922,7 +922,7 @@ class FileController extends File
$file_size = filesize($file_info['tmp_name']);
if (isset($_SESSION['upload_info'][$editor_sequence]->allowed_filesize))
{
- $allowed_attach_size = $allowed_filesize = ($_SESSION['upload_info'][$editor_sequence]->allowed_filesize * 1024 * 1024);
+ $allowed_attach_size = $allowed_filesize = $_SESSION['upload_info'][$editor_sequence]->allowed_filesize;
}
else
{
diff --git a/modules/file/file.model.php b/modules/file/file.model.php
index 1c84d30fe..a0ab5f827 100644
--- a/modules/file/file.model.php
+++ b/modules/file/file.model.php
@@ -121,8 +121,8 @@ class FileModel extends File
{
if (isset($_SESSION['upload_info'][$editor_sequence]->allowed_filesize))
{
- $this->add('allowed_filesize', FileHandler::filesize($_SESSION['upload_info'][$editor_sequence]->allowed_filesize * 1024 * 1024));
- $this->add('allowed_attach_size', FileHandler::filesize($_SESSION['upload_info'][$editor_sequence]->allowed_filesize * 1024 * 1024));
+ $this->add('allowed_filesize', FileHandler::filesize($_SESSION['upload_info'][$editor_sequence]->allowed_filesize));
+ $this->add('allowed_attach_size', FileHandler::filesize($_SESSION['upload_info'][$editor_sequence]->allowed_filesize));
}
if (isset($_SESSION['upload_info'][$editor_sequence]->allowed_extensions))
{