Currently, the API reads file into memory on upload _and_ /assets/ download, which makes it impossible to upload files that are bigger than ~100MB* and makes opening existing thumbnails slow.
We should use Streams to read / write / serve files, instead of reading them into memory whenever we can.
https://flysystem.thephpleague.com/docs/usage/filesystem-api/
https://odan.github.io/2018/03/09/emitting-chunked-stream-responses-with-slim.html
* Depending on your server's memory and max php limits
This is causing us issues now, because having lot of thumbnails displayed on page and therefore browser making lot of parallel requests creates a huge load on the server (compared to previous thumbnailer in which the file was accessed and served directly). It brings smaller AWS instnaces to crash (having just Directus docker container running).
Most helpful comment
This is causing us issues now, because having lot of thumbnails displayed on page and therefore browser making lot of parallel requests creates a huge load on the server (compared to previous thumbnailer in which the file was accessed and served directly). It brings smaller AWS instnaces to crash (having just Directus docker container running).