We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
H5
https://github.com/pulei19960302/taro-issue 浏览器版本: Google 84 使用框架: React
1.点击上传图片,选择一个图片。 2.等待图片上传成功或者失败 3.等待60s后,uploadFile会再次执行fail和complete方法
当图片上传失败是,只会执行一次fail和complete方法,当上传成功时候执行success和complete方法
不轮上传成功或者失败。在等待60秒后都执行了complete方法和fail方法
Taro CLI 2.0.7 environment info: System: OS: macOS 10.15.5 Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.16.1 - /usr/local/bin/node Yarn: 1.22.0 - /usr/local/bin/yarn npm: 6.13.4 - /usr/local/bin/npm
我查看了源码,在uploadFile.js中当send方法中创建了一个60�秒当定时器,并且只有在XMLHttpRequest中的onabort方法中清除了该定时器。
The text was updated successfully, but these errors were encountered:
可以来个 pr 哦
Sorry, something went wrong.
我看了一下代码。这个bug在2.2.7被修复。但只是在上传成功后清除了定时器。onerror和abort方法中没有清除,是否还需要pr
fix(h5): api upload abort fix #7448
6a756e8
0faff5f
bfff90b
d36af2f
No branches or pull requests
相关平台
H5
复现仓库
https://github.com/pulei19960302/taro-issue
浏览器版本: Google 84
使用框架: React
复现步骤
1.点击上传图片,选择一个图片。
2.等待图片上传成功或者失败
3.等待60s后,uploadFile会再次执行fail和complete方法
期望结果
当图片上传失败是,只会执行一次fail和complete方法,当上传成功时候执行success和complete方法
实际结果
不轮上传成功或者失败。在等待60秒后都执行了complete方法和fail方法
环境信息
补充信息
我查看了源码,在uploadFile.js中当send方法中创建了一个60�秒当定时器,并且只有在XMLHttpRequest中的onabort方法中清除了该定时器。
The text was updated successfully, but these errors were encountered: