FIX_ISSUE

This commit is contained in:
VENKATESHWARAN 2026-02-03 12:57:39 +05:30
parent 3f86091720
commit 4fcd101c5f
2 changed files with 26 additions and 10 deletions

View File

@ -4586,15 +4586,15 @@ class EmployeeRestController extends AdminController
// Prepare data // Prepare data
$data = [ $data = [
'client_id' => $this->request->getPost('client_id'), 'client_id' => $post_data['client_id'],
'client_branch_id' => $this->request->getPost('client_branch_id'), 'client_branch_id' => $post_data['client_branch_id'],
'policy_id' => $this->request->getPost('policy_id'), 'policy_id' => $post_data['policy_id'],
'policy_no' => $this->request->getPost('policy_no'), 'policy_no' => $post_data['policy_no'],
'file_name' => $newFileName, 'file_name' => $newFileName,
'file_action' => $this->request->getPost('file_action'), 'file_action' => $post_data['file_action'],
'status' => 'Yet to start', 'status' => 'Yet to start',
'created_by' => $this->request->getPost('created_by'), 'created_by' => $post_data['created_by'],
'updated_by' => $this->request->getPost('created_by'), 'updated_by' => $post_data['created_by'],
]; ];
// Save into DB // Save into DB

View File

@ -948,9 +948,25 @@ if (!function_exists('validateExcelFile')) {
function validateExcelFile($file) function validateExcelFile($file)
{ {
$allowed = [ $allowed = [
'application/vnd.ms-excel', // Standard Excel Formats
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-excel', // .xls
'application/vnd.oasis.opendocument.spreadsheet' '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'; // if ($file->getError() !== UPLOAD_ERR_OK) return 'Upload error';