From e97515ab9fcfe0d9ad63ed3da02973e0f5014576 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Sat, 27 Apr 2024 12:31:37 +0800 Subject: [PATCH] Laravel Vapor - sync code for download files in bulk from S3 to more files --- .../ControllersLogic/BulkDownloadSupplierWhiteFormsLogic.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Classes/Modules/Companies/ControllersLogic/BulkDownloadSupplierWhiteFormsLogic.php b/app/Classes/Modules/Companies/ControllersLogic/BulkDownloadSupplierWhiteFormsLogic.php index 60b8412c..00b19b79 100644 --- a/app/Classes/Modules/Companies/ControllersLogic/BulkDownloadSupplierWhiteFormsLogic.php +++ b/app/Classes/Modules/Companies/ControllersLogic/BulkDownloadSupplierWhiteFormsLogic.php @@ -67,6 +67,10 @@ class BulkDownloadSupplierWhiteFormsLogic } $zip->close(); + $filePathForS3 = 'bulk_whiteform/'.$zipFileName; + Storage::put($filePathForS3, file_get_contents($zip_file), 's3'); + Log::info('BulkDownloadSupplierWhiteFormsLogic finished processing files count: '.count($groups)); + return response()->download($zip_file); } else {