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:27:25 +0700
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
5b6b4967e409e215ca240c0080dc5402fa469659
5b6b4967
1 parent
ce9a15f9
up
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
4 deletions
app/Http/Controllers/OcrController.php
composer.json
composer.lock
config/filesystems.php
config/logging.php
resources/views/dashboard.blade.php
routes/web.php
app/Http/Controllers/OcrController.php
View file @
5b6b496
...
...
@@ -3,6 +3,7 @@
namespace
App\Http\Controllers
;
use
Illuminate\Http\Request
;
use
Carbon\Carbon
;
use
Exception
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Support\Facades\Log
;
...
...
composer.json
View file @
5b6b496
...
...
@@ -10,7 +10,8 @@
"guzzlehttp/guzzle"
:
"^7.2"
,
"laravel/framework"
:
"^9.0"
,
"laravel/sanctum"
:
"^2.14"
,
"laravel/tinker"
:
"^2.7"
"laravel/tinker"
:
"^2.7"
,
"league/flysystem-sftp-v3"
:
"^3.33"
},
"require-dev"
:
{
"fakerphp/faker"
:
"^1.9.1"
,
...
...
composer.lock
View file @
5b6b496
This diff is collapsed.
Click to expand it.
config/filesystems.php
View file @
5b6b496
...
...
@@ -57,7 +57,16 @@
'driver'
=>
'local'
,
'root'
=>
storage_path
(
'ocr'
),
],
'ocr_results_sftp'
=>
[
'driver'
=>
'sftp'
,
'host'
=>
env
(
'OCR_HOST'
,
'172.30.4.104'
),
'username'
=>
env
(
'OCR_USERNAME'
,
'ubuntu'
),
'port'
=>
22
,
'root'
=>
env
(
'OCR_ROOT'
,
'/home/ubuntu/iwa'
),
'timeout'
=>
30
,
'privateKey'
=>
env
(
'OCR_KEY'
),
'passphrase'
=>
env
(
'OCR_PASSPHRASE'
,
null
),
],
],
/*
...
...
config/logging.php
View file @
5b6b496
...
...
@@ -17,7 +17,7 @@
|
*/
'default'
=>
env
(
'LOG_CHANNEL'
,
'
stack
'
),
'default'
=>
env
(
'LOG_CHANNEL'
,
'
daily
'
),
/*
|--------------------------------------------------------------------------
...
...
resources/views/dashboard.blade.php
View file @
5b6b496
...
...
@@ -46,7 +46,7 @@
if
(
!
file
)
return
;
let
formData
=
new
FormData
();
formData
.
append
(
'file'
,
file
);
formData
.
append
(
'
attached_
file'
,
file
);
axios
.
post
(
"{{route('import_pdf')}}"
,
formData
,
{
headers
:{
...
...
routes/web.php
View file @
5b6b496
...
...
@@ -15,4 +15,19 @@
*/
Route
::
get
(
'/'
,
[
OcrController
::
class
,
'index'
]);
Route
::
get
(
'/test'
,
function
()
{
$file
=
'D:\\key\\id_rsa_oms_base_test.pem'
;
return
response
()
->
json
([
'php_sapi'
=>
PHP_SAPI
,
'current_user'
=>
get_current_user
(),
'script_owner'
=>
getmyuid
(),
'cwd'
=>
getcwd
(),
'file_exists'
=>
file_exists
(
$file
),
'is_readable'
=>
is_readable
(
$file
),
'realpath'
=>
realpath
(
$file
),
'file_get_contents'
=>
@
file_get_contents
(
$file
)
!==
false
?
'OK'
:
error_get_last
(),
]);
});
Route
::
post
(
'/import-pdf'
,
[
OcrController
::
class
,
'import_pdf'
])
->
name
(
'import_pdf'
);
...
...
Please
register
or
sign in
to post a comment