Delivering files with PSR-7
This blog post was published more than one year ago and might be outdated!
· One min read
When it comes to reading and returning the contents of a file in a PSR-7 middleware most developers seem use code that does the following: Read the file first, then write it to the response body.