I’m kinda working on something similar and I can’t make it work. How do you attach the file using file_get_contents to the response body so the user can download it?
My files are mp3 / mp4 I have no issue with the downloading part using Stream but my problem is how to delete the file after the user download it. I’m not sure how to store it in memory so I can safely delete the file while the user is still downloading it without interruption.