【发布时间】:2014-11-27 14:01:41
【问题描述】:
app.getImage = function() {
var image = Meteor.http.get("https://turtlerock-discourse.global.ssl.fastly.net/user_avatar/talk.turtlerockstudios.com/takran/45/879.png", {
});
var prefix = "data:image/png;base64,";
var imagebase64 = new Buffer(image.content, 'binary').toString('base64');
imagebase64 = prefix + imagebase64;
console.log(imagebase64);
return imagebase64;
}
但我没有看到结果, 有什么帮助吗? 这是错误的虚拟文本。
【问题讨论】:
-
是在客户端还是服务器上?
-
我认为您遇到了与我在此答案中描述的相同的问题:stackoverflow.com/questions/25654965/…
-
这是在服务器端,因为新的缓冲区在客户端不可用。