diff --git a/inc/common.inc.php b/inc/common.inc.php index 99ed0bd7..58ef87ba 100644 --- a/inc/common.inc.php +++ b/inc/common.inc.php @@ -1836,4 +1836,11 @@ function mfh_log_warning($location, $message, $user) { function mfh_log_error($location, $message, $user) { mfh_log($location, $message, 3, $user); +} + +function mfh_bytesToUnits($size) { + $bytes_in_megabyte = 1048576; + $quotient = $size / $bytes_in_megabyte; + + return intval($quotient); } \ No newline at end of file diff --git a/inc/view_attachment_functions.inc.php b/inc/view_attachment_functions.inc.php index 16731f4f..0f1ed32e 100644 --- a/inc/view_attachment_functions.inc.php +++ b/inc/view_attachment_functions.inc.php @@ -211,6 +211,8 @@ function display_dropzone_field($url, $id = 'filedrop') { output_attachment_id_holder_container($id); $acceptedFiles = implode(',', $hesk_settings['attachments']['allowed_types']); + $size = mfh_bytesToUnits($hesk_settings['attachments']['max_size']); + $max_files = $hesk_settings['attachments']['max_number']; echo " diff --git a/language/en/text.php b/language/en/text.php index b629b4be..eb75e301 100644 --- a/language/en/text.php +++ b/language/en/text.php @@ -35,6 +35,10 @@ $hesklang['can_view_logs'] = 'Can view message logs'; $hesklang['attachment_viewer_message'] = 'Drag or click here to select files to upload.'; $hesklang['attachment_invalid_type_message'] = 'Sorry, but the file type you tried to upload is not allowed.'; $hesklang['attachment_upload_error'] = 'An error occurred when trying to upload. Please try again later.'; +$hesklang['attachment_too_large'] = 'This attachment is larger than the max filesize permitted.'; +$hesklang['attachment_cancel'] = 'Cancel'; +$hesklang['attachment_confirm_cancel'] = 'Are you sure you want to cancel this upload?'; +$hesklang['attachment_remove'] = 'Remove attachment'; // ADDED OR MODIFIED IN Mods for HESK 2.5.2 $hesklang['manage_statuses'] = 'Manage Statuses';