From 4fcd101c5fa90c8ee8d06fcd434132fabaede5df Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Tue, 3 Feb 2026 12:57:39 +0530 Subject: [PATCH] FIX_ISSUE --- app/Controllers/EmployeeRestController.php | 14 +++++++------- app/Helpers/utility_helper.php | 22 +++++++++++++++++++--- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 1581c02e..0b1d2fbf 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -4586,15 +4586,15 @@ class EmployeeRestController extends AdminController // Prepare data $data = [ - 'client_id' => $this->request->getPost('client_id'), - 'client_branch_id' => $this->request->getPost('client_branch_id'), - 'policy_id' => $this->request->getPost('policy_id'), - 'policy_no' => $this->request->getPost('policy_no'), + 'client_id' => $post_data['client_id'], + 'client_branch_id' => $post_data['client_branch_id'], + 'policy_id' => $post_data['policy_id'], + 'policy_no' => $post_data['policy_no'], 'file_name' => $newFileName, - 'file_action' => $this->request->getPost('file_action'), + 'file_action' => $post_data['file_action'], 'status' => 'Yet to start', - 'created_by' => $this->request->getPost('created_by'), - 'updated_by' => $this->request->getPost('created_by'), + 'created_by' => $post_data['created_by'], + 'updated_by' => $post_data['created_by'], ]; // Save into DB diff --git a/app/Helpers/utility_helper.php b/app/Helpers/utility_helper.php index 919fd49c..b23a8338 100755 --- a/app/Helpers/utility_helper.php +++ b/app/Helpers/utility_helper.php @@ -948,9 +948,25 @@ if (!function_exists('validateExcelFile')) { function validateExcelFile($file) { $allowed = [ - 'application/vnd.ms-excel', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'application/vnd.oasis.opendocument.spreadsheet' + // Standard Excel Formats + 'application/vnd.ms-excel', // .xls + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', // .xlsx + 'application/vnd.oasis.opendocument.spreadsheet', // .ods (OpenDocument) + + // Macro-Enabled & Specialized Formats + 'application/vnd.ms-excel.sheet.macroEnabled.12', // .xlsm + 'application/vnd.ms-excel.template.macroEnabled.12', // .xltm + 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', // .xlsb + 'application/vnd.ms-excel.addin.macroEnabled.12', // .xlam + + // Common "Edge Case" and Legacy Types + 'application/excel', // Legacy + 'application/x-excel', // Legacy/Vendor + 'application/x-msexcel', // Legacy/Vendor + 'application/x-ms-excel', // Legacy/Vendor + 'application/x-dos_ms_excel', // Very old legacy + 'text/xls', // Common mislabel + 'text/xlsx' // Common mislabel ]; // if ($file->getError() !== UPLOAD_ERR_OK) return 'Upload error';