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
@shepherdwind
你好,我在 beforeUpload中 如果抛出了Promise.reject的异常,IE和火狐等浏览器都会出现 Unhandled promise rejection的错误;
能否在源码 AjaxUploader文件里面的upload方法里面:
if(before&&before.then) { before.then(...) }
添加一个异常捕获处理?
if(before&&before.then) { before.then(...).catch((err)=>{}) }
The text was updated successfully, but these errors were encountered:
具体场景列一下,我感觉最好在 Promise 里面直接处理异常吧。不是很清楚为什么一定要在组件里面处理业务异常。
Sorry, something went wrong.
@shepherdwind 我要实现的功能是: 在图片上传之前对file进行压缩处理,并对选择的文件进行筛选 代码如下: 这是 beforeUpload 函数,
我已经用 try catch进行了异常处理,并且在catch里面捕获到了异常,但是上图代码会出现下面的情况:
虽然捕获到了异常,但是 还是上传了这个mp4文件;
只有在catch里面继续抛出异常才能终止这个文件的上传...不知道什么情况?
哦,我知道了,这里处理是有问题。
eac29ad
2.3.3 加了一个 catch
No branches or pull requests
@shepherdwind
你好,我在 beforeUpload中 如果抛出了Promise.reject的异常,IE和火狐等浏览器都会出现
Unhandled promise rejection的错误;
能否在源码 AjaxUploader文件里面的upload方法里面:
if(before&&before.then) { before.then(...) }
添加一个异常捕获处理?
if(before&&before.then) { before.then(...).catch((err)=>{}) }
The text was updated successfully, but these errors were encountered: