From 9f7be7e8e5bb8f2292e7e368b8a5ef887516082c Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Tue, 18 Nov 2025 11:47:42 +0530 Subject: [PATCH] FIX_UPLOAD_ERROR --- app/Controllers/EmployeeRestController.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 0cd0fdd..804af72 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -803,12 +803,9 @@ class EmployeeRestController extends AdminController { if(isset($result['error_type'])){ $result = $empServiceController->getExcelErrorData($file_id); - return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "file upload failed with errors",'data' => $result], 200); + return $this->respond(['status' => 'failed', 'code' => 404, 'message' => 'The data format is invalid. Click "Next" to view details.','data' => $result], 200); }else { - $message = "file upload failed with errors"; - if(isset($result['error_data'])){ - $message = $result['error_data']; - } + $message = "The import file is in an incorrect format. Please compare it with our template file to correct it."; return $this->respond(['status' => 'failed', 'code' => 404, 'message' => $message,'data' => $result], 200); } }