mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-29 17:34:02 +00:00
Export file directly from Laravel Vapor without going through S3 bucket
This commit is contained in:
@@ -66,7 +66,9 @@ class ExportCustomersToExcelController
|
||||
mkdir($exportDirectory, 0755, true);
|
||||
}
|
||||
$localPath = $exportDirectory . '/' . $exportFileName;
|
||||
$response = $exportsTransactions->store($exportFileName, 'local', Excel::XLS);
|
||||
$response = $exportsTransactions->download($exportFileName, Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
|
||||
|
||||
file_put_contents($localPath, $response);
|
||||
return response()->file($localPath, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
|
||||
}
|
||||
else{
|
||||
|
||||
Reference in New Issue
Block a user