Why is fs.createReadStream … pipe(res) locking the read file?
I'm using express to stream audio & video files according to this answer . Relevant code looks like this: function streamMedia(filePath, req, res) { // code here to determine which bytes to send, compute response headers, etc. res.writeHead(status, headers); var stream = fs.createReadStream(filePath, { start, end }) .on('open', function() { stream.pipe(res); }) .on('error', function(err) { res.end(err); }) ; } This works just fine to stream bytes to <audio> and <video> elements on the client. However after these requests are served, another express request can delete the file being streamed