这是express.js中的代码 -
var writeStream = fs.createWriteStream('./uploads/streetview/images/' + image_name + '.jpg');
writeStream.on('close', function() {
console.log('file done');
});
request(g_url).pipe(writeStream);
用于少量图片网址的工作文件。但是当超过1000时,图像会变形或损坏。