Wenzz
Wenzz

Reputation: 368

Laravel 4 Response download issue

I am trying to force a download of a zip file that contains a few PDFS.

return Response::download($zipperPath, NULL, array('content-type' => 'application/zip'));

This will force the download.. however the files are corrupted. If I repair the zip it fixes the issue with the re-built zip. I am not sure if maybe I am missing something in the headers or if this is an issue with Laravel?

any help is appreciated, thanks.

Upvotes: 0

Views: 2212

Answers (1)

GTCrais
GTCrais

Reputation: 2077

$response = Response::download($file, NULL, $headers);
ob_end_clean();
return $response;

https://github.com/laravel/framework/issues/2892

Upvotes: 7

Related Questions