Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Dung Diego
/
ocr-tool
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Dung Diego
2026-07-10 14:49:07 +0700
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
a4e9cd130f5a998824bd4d069827823e2cbc6724
a4e9cd13
1 parent
5b6b4967
up
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
10 deletions
app/Http/Controllers/OcrController.php
app/Http/Controllers/OcrController.php
View file @
a4e9cd1
...
...
@@ -36,7 +36,6 @@ public function import_pdf(Request $request){
public
function
ocr_process
(
$request
){
set_time_limit
(
0
);
ini_set
(
'max_execution_time'
,
0
);
$mount_path
=
env
(
'PYTHON_SERVICE_MOUNT_PATH'
,
''
);
$ocr_serve_path
=
env
(
'OCR_SERVER_PATH'
,
''
);
$ocr_storage
=
'ocr_results'
;
if
(
$ocr_serve_path
)
$ocr_storage
=
'ocr_results_sftp'
;
...
...
@@ -51,15 +50,6 @@ public function ocr_process($request){
$ch
=
curl_init
();
Storage
::
disk
(
'ocr_results'
)
->
makeDirectory
(
$now
);
chmod
(
Storage
::
disk
(
'ocr_results'
)
->
path
(
$now
),
0777
);
if
(
!
empty
(
$mount_path
)){
$file_path
=
str_replace
(
'/'
,
'\\'
,
str_replace
(
'/mnt/ocr'
,
$mount_path
,
$file_path
));
}
$params
=
[
'file_path'
=>
$file_path
,
];
...
...
Please
register
or
sign in
to post a comment