response.download question
Is there a way to prune the file while downloading? Coz, I think, whenever I prune the data that is currently being downloaded, the server crash. I wanted to do an expiration date for one file. For example, one file can only be accessed for x hours before getting deleted.
so mid download you want to stop? what kind of service is this? if someone was downloading before wouldnt you want it to finish?
Even if I wanted them to finish it first before it is deleted, How can I detect if they already finish their download. I'm building a system that can download from file hosting. So, I don't want to store the files too long. Thats why my service must have an expiration time.
maybe i should return the stream, so you can listen on events
Fixed res.download() callback, passing stream. Closed by 07eb66c205a583a13ddbcf4f74d6802a2b1dec5e
should be able to figure something out with this. at very least use redis or something with INCR/DECR to keep a count on active downloads
Thanks for this. I really appreciate it :)