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

上传事件监听没有效果 #72

Open
gyq520 opened this issue Jan 16, 2020 · 3 comments
Open

上传事件监听没有效果 #72

gyq520 opened this issue Jan 16, 2020 · 3 comments

Comments

@gyq520
Copy link

gyq520 commented Jan 16, 2020

const uploadProgress = p => console.log(p.currentSize / p.totalSize);
AliyunOSS.addEventListener('uploadProgress', uploadProgress);

这代码不输出是怎么回事,上传结果是成功的,但是没有执行监听事件

@gyq520
Copy link
Author

gyq520 commented Jan 16, 2020

"version": "1.0.0-alpha.7",

@luozhang002
Copy link
Collaborator

目前已经有端实际没升级了,跟RN官方不一定同步,建议利用RN 插件扩展自己封装,直接调用原生的

@gyq520
Copy link
Author

gyq520 commented Jan 21, 2020

目前已经有端实际没升级了,跟RN官方不一定同步,建议利用RN插件扩展自己封装,直接调用原生的

看了一下代码发现是因为multipartUpload里面没有context.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit( “上传进度”,onProgressValueData);
也就是说分片上传没有监听上传事件,那分片上传如何获取上传进度

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