extract pdf use case
This commit is contained in:
parent
b1bee8a16e
commit
bc7937d2b3
7 changed files with 141 additions and 26 deletions
17
backend/app/Shared/Files/LaravelStoredFileReader.php
Normal file
17
backend/app/Shared/Files/LaravelStoredFileReader.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Shared\Files;
|
||||
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class LaravelStoredFileReader implements StoredFileReader
|
||||
{
|
||||
public function read(string $path): ?string
|
||||
{
|
||||
if (!Storage::disk('public')->exists($path)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Storage::disk('public')->get($path);
|
||||
}
|
||||
}
|
||||
8
backend/app/Shared/Files/StoredFileReader.php
Normal file
8
backend/app/Shared/Files/StoredFileReader.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Shared\Files;
|
||||
|
||||
interface StoredFileReader
|
||||
{
|
||||
public function read(string $path): ?string;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue