mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-26 07:53:58 +00:00
Export file directly from Laravel Vapor without going through S3 bucket
This commit is contained in:
@@ -21,6 +21,7 @@ use App\Models\TransactionMappingLog;
|
||||
use App\Classes\Modules\Exports\Services\ExportsReceiptTransactions;
|
||||
use App\Classes\Modules\Exports\Services\ExportsImportedReceiptMappeds;
|
||||
use App\Classes\Modules\Exports\Services\ExportsWhiteFormTransactions;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class ExportCustomersToExcelController
|
||||
{
|
||||
@@ -58,7 +59,10 @@ class ExportCustomersToExcelController
|
||||
public function paymentTransactions(Request $request){
|
||||
$exportsTransactions = new ExportsPaymentTransactions($request);
|
||||
$response = $exportsTransactions->download('payment-transactions.xls', Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
|
||||
ob_end_clean();
|
||||
$filesystemDriver = Storage::getDefaultDriver();
|
||||
if($filesystemDriver !== 's3'){
|
||||
ob_end_clean();
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
@@ -113,4 +117,4 @@ class ExportCustomersToExcelController
|
||||
ob_end_clean();
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user