1111

root 站长 2022-07-05 14:38:34 0

app.get('/video', function (req, res) {
    var time = new Date();
    var videoName = req.query.name;
    console.log("-------点击查询下载" + time.getFullYear() + "/" + time.getMonth() + "/" + time.getDate() + "/" + time.getHours() + "/" + time.getMinutes() + "/" + time.getSeconds() + "-------");
    res.writeHead(200, {'Content-Type': 'video/mp4'});
    var rs = fs.createReadStream(videoName + '.mp4');
    rs.pipe(res);
 
    rs.on('end', function () {
        res.end();
        console.log('end call');
    });
});
{{ vote && vote.total.up }}