nodejs读取图片返回给浏览器显示
回404,存在则读取文件 ,并返回文件。//设置请求的返回头type,content的type类型列表见上面response.setHeader("Content-Type", contentType);//格式必须为 binary 否则会出错var content = fs.readFileSync(url,"binary");response.writeHead(200, "Ok");response.write(content,"binary"); //格式必须为 binary,否则会出错response.end();二、动态文件流处理原理:使用nodejs 的fs.createRea