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

This commit is contained in:
Dillon Ngo
2024-04-29 12:46:27 +08:00
parent 69572e7234
commit 23909e3608
@@ -73,10 +73,12 @@ class BulkDownloadSupplierWhiteFormsLogic
Log::info('BulkDownloadSupplierWhiteFormsLogic finished processing files count: '.count($groups));
return response()->streamDownload(function () use ($filePathForS3) {
echo Storage::disk('s3')->temporaryUrl(
$temporaryUrl = Storage::disk('s3')->temporaryUrl(
$filePathForS3,
Carbon::now()->addMinutes(60)
);
$fileContents = file_get_contents($temporaryUrl);
echo $fileContents;
}, $zipFileName);
}
else {