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

请问一下,文件上传失败后再点击重试,文件状态为何是等待中 #49

Open
purple910 opened this issue Nov 22, 2022 · 1 comment

Comments

@purple910
Copy link

版本信息:
"vue": "^2.5.17",
"vue-simple-uploader": "^0.7.6",

// 每个文件传输给后端之后,返回的信息
onFileSuccess(rootFile, file, response, chunk) {
let res = JSON.parse(response)
if (res.code == 10000) {
// 服务端自定义的错误(即http状态码为200,但是是错误的情况),这种错误是Uploader无法拦截的
this.error(res.message)
// 文件状态设为“失败”
// this.statusSet(file.id, 'failed')
file.completed = false
file.error = true
file.waiting = false
file.chunks = []
file.testChunks = false
}
this.fileList = this.$refs['uploader'].fileList
},

image
点击重试后,文件状态变为等待中而不是上传失败
image

@shady-xia
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