node-webot / co-wechat-api

Wechat API. Support Async Functions
Other
724 stars 170 forks source link

上传永久素材时无返回信息,上传临时素材时返回buffer #26

Open cloudray8580 opened 8 years ago

cloudray8580 commented 8 years ago

调用 uploadMaterial(filepath, 'TYPE) 时,无反应,即无成功result,也无errmsg,程序也无报错。 调用 uploadMedia(filename, TYPE)时, 返回buffer,如下,即非腾讯返回示例里的四种类型。

mediaresult: {"type":"Buffer","data":[123,34,118,111,105,99,101,95,99,111,117,11 0,116,34,58,49,44,34,118,105,100,101,111,95,99,111,117,110,116,34,58,48,44,34,10 5,109,97,103,101,95,99,111,117,110,116,34,58,51,44,34,110,101,119,115,95,99,111, 117,110,116,34,58,50,125]}

cloudray8580 commented 8 years ago

用了 @logerzhu 提供的重写request的方法,可以用了

vimer commented 7 years ago

@cloudray8580 哪个方法 我也遇到你这个情况

cloudray8580 commented 7 years ago

@vimer 你看下最后一个issue,里面有

charmer1989 commented 7 years ago

把api_material.js的39行 stream改成data就好了 估计作者笔误了