Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用上传永久素材接口uploadMeterial时,一直提示Error: socket hang up #23

Open
roc198 opened this issue Apr 27, 2016 · 1 comment

Comments

@roc198
Copy link

roc198 commented Apr 27, 2016

测试代码:

var filePath = path.resolve('./public/upload');
var filename = path.join(filePath, '1.jpeg');
var type = 'image';
var result = yield api.uploadMaterial(filename, type);
this.body = result;

已创建好api对象,执行时,返回:

Error: socket hang up
at createHangUpError (_http_client.js:203:15)
at TLSSocket.socketOnEnd (_http_client.js:288:23)
at emitNone (events.js:72:20)
at TLSSocket.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:905:12)
at doNTCallback2 (node.js:441:9)
at process._tickCallback (node.js:355:17)

测试环境:
MACOS:10.11.4
node:v4.2.2

换为express+wechat-api则无问题。

@foreleven
Copy link

的确有这个问题,node版本 5.10.0 6.0.0 都试过
只能自己写了这个方法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants