Laravel Vapor - sync code for download files in bulk from S3 to more files

This commit is contained in:
Dillon Ngo
2024-04-30 12:15:16 +08:00
parent 2c9c5d49ed
commit 78fbd66a53
+2 -2
View File
@@ -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;
}