Level 1
i have the same problem , try something like this
axios.post('/api/download/file',{id:id})
.then(response => {
window.open('/api/download/file/'+id});
}).catch(error => {
console.log(error.response.data);
});
public function download(){
$download_path = storage_path('app/'.$id.'.zip');
$filename=$id.'zip';
$headers = ['Content-Type: application/zip','Content-Disposition: attachment; filename={$filename}'];
return response($download_path, 200,$headers);
}