Download response returns to blob url

After successfully creating an export (xlsx), triggering a download response results in a blob url redirect, like:
blob:https://domain.com/ff0f41ed-0d23-4ef9-8da6-500c1220a6c3

I’ve been using @Snapey’s solution and it all seems to work on my dev environment, but won’t work on staging/production environments.

The file actually exists, and when I try to download directly from a web route, it also triggers the download like it should.

Are you using the latest version of Livewire: Yes

I hope somebody can point me in the right direction here. Thanks!

For future references, this was my solution. I had to set some headers.

public function downloadExport($file)
{
   return Storage::disk('local')->download($file, 'export.xlsx', [
       'Content-Type' => 'application/vnd.ms-excel',
   ]);
}
1 Like