#Livewire cannot download large files

7 messages · Page 1 of 1 (latest)

frigid pumice
#

Seems like Livewire is always causing a file download to be first loaded into memory and I'm getting memory exceeded error. Moving the same code to Laravel controller works fine.

I've tried response()->download and response()->streamDownload with call to readFile as stream content.

If I move the download logic to a controller, then I cannot call it from Livewire component because redirect()->route() breaks the component rendering loop.

Any ideas? I have files >500 MB. Thanks

jagged jungle
#

Using s3 or local filesystem?

frigid pumice
#

local

ocean basalt
#

you can have a link with href updated via livewire or return the url from livewire action then window.open(url) with alpine
e.g. $wire.action().then(open)

merry tartan
#

What is the file?

#

Excel?

#

Csv?