Dung Diego

up

...@@ -36,7 +36,6 @@ public function import_pdf(Request $request){ ...@@ -36,7 +36,6 @@ public function import_pdf(Request $request){
36 public function ocr_process($request){ 36 public function ocr_process($request){
37 set_time_limit(0); 37 set_time_limit(0);
38 ini_set('max_execution_time', 0); 38 ini_set('max_execution_time', 0);
39 - $mount_path=env('PYTHON_SERVICE_MOUNT_PATH','');
40 $ocr_serve_path=env('OCR_SERVER_PATH',''); 39 $ocr_serve_path=env('OCR_SERVER_PATH','');
41 $ocr_storage='ocr_results'; 40 $ocr_storage='ocr_results';
42 if($ocr_serve_path) $ocr_storage='ocr_results_sftp'; 41 if($ocr_serve_path) $ocr_storage='ocr_results_sftp';
...@@ -51,15 +50,6 @@ public function ocr_process($request){ ...@@ -51,15 +50,6 @@ public function ocr_process($request){
51 $ch = curl_init(); 50 $ch = curl_init();
52 Storage::disk('ocr_results')->makeDirectory($now); 51 Storage::disk('ocr_results')->makeDirectory($now);
53 chmod(Storage::disk('ocr_results')->path($now), 0777); 52 chmod(Storage::disk('ocr_results')->path($now), 0777);
54 -
55 - if(!empty($mount_path)){
56 - $file_path = str_replace('/', '\\', str_replace(
57 - '/mnt/ocr',
58 - $mount_path,
59 - $file_path
60 - ));
61 - }
62 -
63 $params = [ 53 $params = [
64 'file_path' => $file_path, 54 'file_path' => $file_path,
65 ]; 55 ];
......