diff --git a/routes/web.php b/routes/web.php index 58a3638..1f337f1 100644 --- a/routes/web.php +++ b/routes/web.php @@ -32,6 +32,11 @@ use thiagoalessio\TesseractOCR\TesseractOCR; }); Route::post('/verify-ocr', function (Request $request) { + + if (!$request->has('path')) { + return response()->json(['success' => false, 'error' => 'No file path provided']); + } + $filePath = storage_path('app/private/temp/' . basename($request->path)); if (!file_exists($filePath)) {