From 78fbd66a53cd4b09dda35d91527bdc685363f036 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Tue, 30 Apr 2024 12:15:16 +0800 Subject: [PATCH] Laravel Vapor - sync code for download files in bulk from S3 to more files --- app/Classes/General/ExcelHandel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Classes/General/ExcelHandel.php b/app/Classes/General/ExcelHandel.php index 31034ff8..cc476b0d 100644 --- a/app/Classes/General/ExcelHandel.php +++ b/app/Classes/General/ExcelHandel.php @@ -72,13 +72,13 @@ class ExcelHandel if($filesystemDriver === 's3'){ $filePathForS3 = 'public/excels/' . $path . '/' . $filename . '.' . $extension; Storage::disk('s3')->put($filePathForS3, $exceldata); + $file_info['original']['file'] = Storage::disk('s3')->path($filePathForS3); } else{ $file = Storage::disk('public')->put('excels/' . $path . '/' . $filename . '.' . $extension, $exceldata); + $file_info['original']['file'] = storage_path('app/public/excels/' . $path . '/' . $filename . '.' . $extension); } - $file_info['original']['file'] = storage_path('app/public/excels/' . $path . '/' . $filename . '.' . $extension); - return $file_info; }