changed logic in ocr

This commit is contained in:
dhanabalan
2025-10-18 11:59:48 +05:30
parent 5bda5a5a05
commit d05876cccd

View File

@@ -32,6 +32,11 @@ use thiagoalessio\TesseractOCR\TesseractOCR;
}); });
Route::post('/verify-ocr', function (Request $request) { 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)); $filePath = storage_path('app/private/temp/' . basename($request->path));
if (!file_exists($filePath)) { if (!file_exists($filePath)) {