diff --git a/app/Http/Controllers/SapFileController.php b/app/Http/Controllers/SapFileController.php index 551b4b2..99dd251 100644 --- a/app/Http/Controllers/SapFileController.php +++ b/app/Http/Controllers/SapFileController.php @@ -30,23 +30,23 @@ class SapFileController extends Controller public function readFiles() { - $path = "/srv/pds.iotsignin.com/sapftp/In/"; + $path = "/srv/pds.iotsignin.com/www/out/"; - $isDir = is_dir($path); - $isReadable = is_readable($path); + $isDir = is_dir($path); + $isReadable = is_readable($path); - if (!$isDir || !$isReadable) { - return response()->json([ - 'status' => 'error', - 'message' => 'Folder not accessible', - 'debug' => [ - 'path_checked' => $path, - 'is_dir' => $isDir, - 'is_readable' => $isReadable, - 'php_user' => get_current_user(), - ] - ], 500); - } + if (!$isDir || !$isReadable) { + return response()->json([ + 'status' => 'error', + 'message' => 'Folder not accessible', + 'debug' => [ + 'path_checked' => $path, + 'is_dir' => $isDir, + 'is_readable' => $isReadable, + 'php_user' => get_current_user(), + ] + ], 500); + } // Scan folder $allFiles = scandir($path);