]> BookStack Code Mirror - bookstack/commit
Updated attachment download responses to stream from filesystem
authorDan Brown <redacted>
Sat, 2 Apr 2022 17:07:43 +0000 (18:07 +0100)
committerDan Brown <redacted>
Sat, 2 Apr 2022 17:07:43 +0000 (18:07 +0100)
commit82e8b1577ec0c7b136da5eed9c89d4790714814c
tree4bd66f6b5064edbd6e755601922be3c2e0eb9ec1
parentaffae2e3c422282f0fdf5e2c5f924182067a9fee
Updated attachment download responses to stream from filesystem

This allows download of attachments that are larger than current memory
limits, since we're not loading the entire file into memory any more.

For inline file responses, we take a 1kb portion of the file to sniff
before to check mime before we proceed.
app/Http/Controllers/AttachmentController.php
app/Http/Controllers/Controller.php
app/Uploads/AttachmentService.php