controller refactoring part 22

This commit is contained in:
Peter Papp
2021-07-21 17:21:19 +02:00
parent d55f5c3b41
commit 9fb9b8a1b0
32 changed files with 105 additions and 173 deletions

View File

@@ -1,13 +1,10 @@
<?php
namespace Domain\Files\Actions;
use Aws\Exception\MultipartUploadException;
use Aws\S3\MultipartUploader;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use Aws\Exception\MultipartUploadException;
use Symfony\Component\HttpKernel\Exception\HttpException;
class MoveFileToExternalStorageAction
@@ -16,9 +13,9 @@ class MoveFileToExternalStorageAction
* Move file to external storage if is set
*/
public function __invoke(
string $file, string $user_id
string $file,
string $user_id
): void {
$disk_local = \Storage::disk('local');
// Get file size
@@ -63,4 +60,4 @@ class MoveFileToExternalStorageAction
// Delete file after upload
$disk_local->delete("files/$user_id/$file");
}
}
}