What seems to be the problem:
I am trying to make a streamed download and got a feeling that streamed download is not supported by Livewire at all.
Steps to Reproduce:
Export large amount of data as a stream:
return response()->streamDownload(function () use($ids, $filename) {
$options = new \ZipStream\Option\Archive();
$options->setSendHttpHeaders(false);
$zip = new \ZipStream\ZipStream($filename, $options);
Media::whereIn('id', $ids)->select('id', 'original_name', 'data')->chunk(10, function($medias) use ($zip){
foreach ($medias as $media) {
$zip->addFile($media->original_name, $media->data);
}
});
$zip->finish();
}, $filename);
Are you using the latest version of Livewire:
yes