fix download
fixed bug, when we received corrupted (non-opening) file with download() method
Hi, thank you for your contribution! The exportOrDownload function can download or export. It means the file can be saved and in this case, the program should not stop. Still, https://github.com/box/spout/issues/168#issuecomment-197276897 issue says "This is not a library issue". So I guess users have to add exit by theirselves.
Hi, @rap2hpoutre ! Yes, its said "This is not a library issue", but no Spout issue. In that part of code you are using Spout and we need to add this 'exit;' line to get proper (not corrupted) file on download method. Export functionality is not hurted with this.
Hi, without this fix method download don't work, using laravel 5.5
In order to solve the issue correctly you should use Laravel means for the file download organization. See https://laravel.com/docs/8.x/responses#file-downloads
Issue is resolved now