changed logic in ocr
This commit is contained in:
@@ -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)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user