M
M
MasterCopipaster2020-06-25 12:49:05
Laravel
MasterCopipaster, 2020-06-25 12:49:05

How to send raw file in laravel?

Actually the question in the title is how to send a raw file in a stream to the browser?
This obviously doesn't work

return response()->stream(function() use($file) {
                echo $file;
            }, 200);

Call to undefined method Symfony\Component\HttpFoundation\StreamedResponse::header()

As a matter of fact, all 50 nearest links in google did not say anything useful.
The task is simply to give the binary file to the browser without reading it into memory.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
MasterCopipaster, 2020-06-25
@MasterCopipaster

In general - it was a bug read more here

J
JhaoDa, 2020-06-25
@JhaoDa

See what's there .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question