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

mongo alias 的 stream error 事件不会被触发 #27

Open
crapthings opened this issue Mar 17, 2020 · 1 comment
Open

mongo alias 的 stream error 事件不会被触发 #27

crapthings opened this issue Mar 17, 2020 · 1 comment

Comments

@crapthings
Copy link

以后有时间看看这个吧,就是在封装的部分把 stream.on('error') 也给出来
我暂时用上传前后都检查 md5 解决了

const stream = ndsNamespace.openDownloadStream(fileId)

// 没有对应文件但是不触发,应该是 nexusdocs 问题
stream.on('error', function (error) {
  console.log(error)
  // 我想在这里 throw 一个错误,这样下边 oss.putStream 不会把空内容传到阿里云
})

await oss.putStream(fileId, stream, { mime, headers })
@alphakevin
Copy link
Contributor

Related to #22

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

No branches or pull requests

2 participants