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

多张图片上传之后,成功回调,回调回来的result 地址是同一个地址 #1

Open
lishulong199253 opened this issue Jan 6, 2020 · 5 comments

Comments

@lishulong199253
Copy link

No description provided.

@lishulong199253
Copy link
Author

图片确实都上传成功了,但是回调会来打印出来是同一个result 地址

@lishulong199253
Copy link
Author

WechatIMG2142

@lishulong199253
Copy link
Author

应该是js 异步引起的,for 循环多次调用 Upload.js 的init 方法,最后一次初始化 了aliyunFileKey,所以最后 uploadFile 方法异步触发成功的时候,这时候的 aliyunFileKey查找到的都是 Upload 这个对象上绑定的 值(就是最后一次绑定上去的值)

@lishulong199253
Copy link
Author

这样改下就可以了,将值传过来就行了
截屏2020-01-06下午8 45 37

@aPathFinder
Copy link
Owner

谢谢

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