📅  最后修改于: 2022-03-11 15:03:06.092000             🧑  作者: Mango
var fs = require('fs');
function(req,res){
fs.readFile('image.jpg', function(err, data) {
if (err) throw err; // Fail if the file can't be read.
res.writeHead(200, {'Content-Type': 'image/jpeg'});
res.end(data); // Send the file data to the browser.
});
}