FIX_due filepath missing
This commit is contained in:
parent
e0eeb42779
commit
88cd33e2f0
@ -1134,6 +1134,7 @@ class ClientController extends AdminController
|
||||
$data = $this->request->getPost();
|
||||
$sanitized_data = sanitizeInputArrayAdvanced($data);
|
||||
$form_type = $sanitized_data['form_type'] ?? null;
|
||||
$uploadFilePath = WRITEPATH . 'uploads/client_kyc_documents';
|
||||
|
||||
unset($data['file_name']);
|
||||
|
||||
@ -1188,6 +1189,7 @@ class ClientController extends AdminController
|
||||
$data = $this->request->getPost();
|
||||
$sanitized_data = sanitizeInputArrayAdvanced($data);
|
||||
$form_type = $sanitized_data['form_type'] ?? null;
|
||||
$uploadFilePath = WRITEPATH . 'uploads/client_kyc_documents';
|
||||
|
||||
unset($sanitized_data['file_name']);
|
||||
|
||||
@ -1279,6 +1281,7 @@ class ClientController extends AdminController
|
||||
|
||||
$file = $this->request->getFile('file_name');
|
||||
|
||||
$uploadFilePath = WRITEPATH . 'uploads/client_kyc_documents';
|
||||
$fileName = file_Upload($file, $uploadFilePath);
|
||||
|
||||
if (!empty($fileName)) {
|
||||
@ -1286,10 +1289,10 @@ class ClientController extends AdminController
|
||||
}
|
||||
|
||||
$sanitized_data['created_by'] = get_session_userid();
|
||||
$uploadFilePath = WRITEPATH . 'uploads/client_kyc_documents';
|
||||
|
||||
$File = file_Upload($uploadedFile, $uploadFilePath);
|
||||
$this->myLogger->logme('info', 'Result of file_Upload: ' . $File);
|
||||
|
||||
|
||||
$this->myLogger->logme('info', 'Result of file_Upload: ' . $fileName);
|
||||
unset($data['file_name']);
|
||||
|
||||
$insertID = $this->clientKYCDocsModel->insert($sanitized_data);
|
||||
@ -1297,7 +1300,7 @@ class ClientController extends AdminController
|
||||
if ($insertID) {
|
||||
$html = $this->generateKycSingleTable($sanitized_data['client_id']);
|
||||
$dropdown = $this->fetch_dropdown($sanitized_data['client_id']);
|
||||
return $this->respond(['status' => true, 'code' => 200, 'file_name' => $File, 'html' => $html,'dropdown'=>$dropdown], 200);
|
||||
return $this->respond(['status' => true, 'code' => 200, 'file_name' => $fileName, 'html' => $html,'dropdown'=>$dropdown], 200);
|
||||
} else {
|
||||
$this->myLogger->logme('error', 'Database insert failed.');
|
||||
return $this->respond(['status' => false, 'code' => 404, 'message' => 'Failed to add document'], 200);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user