CHANGES_HR file upload changes : GWM
This commit is contained in:
parent
06b3d4f0e8
commit
a46d14881b
@ -3502,8 +3502,12 @@ class EmployeeRestController extends AdminController
|
|||||||
try {
|
try {
|
||||||
// Check file
|
// Check file
|
||||||
$file = $this->request->getFile('file_name');
|
$file = $this->request->getFile('file_name');
|
||||||
if (!$file->isValid()) {
|
if (!$file) {
|
||||||
return $this->failValidationErrors(['file_name' => 'Invalid or missing file']);
|
return $this->response->setJSON([
|
||||||
|
'status' => false,
|
||||||
|
'message' => "Invalid file or file not uploaded.",
|
||||||
|
'data' => "No Data"
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Upload folder path
|
// Upload folder path
|
||||||
@ -3551,7 +3555,7 @@ class EmployeeRestController extends AdminController
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$file_id = $this->request->getFile('id') ?? $id;
|
$file_id = $this->request->getGet('id') ?? $id;
|
||||||
|
|
||||||
// Find record
|
// Find record
|
||||||
$record = $this->hrFileUploadModel->find($file_id);
|
$record = $this->hrFileUploadModel->find($file_id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user