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

你好,问下断点续传的问题 #69

Closed
364124337 opened this issue Feb 27, 2019 · 9 comments
Closed

你好,问下断点续传的问题 #69

364124337 opened this issue Feb 27, 2019 · 9 comments

Comments

@364124337
Copy link

使用testChunks 后,在
target: (...args)=>{
if(args[2]){
return xxx/mgr/getTaskProgress.do
}else{
return xxx/mgr/uploadPart.do
}
},
在checkChunkUploadedByResponse处理好后,使用第二个接口(xxx/mgr/uploadPart.do)上传为啥第一块没有上传了?急急急!!!

@364124337
Copy link
Author

求大佬解释下!

@364124337
Copy link
Author

testMethod:'POST' 是否 testMethod :'PUT'要为这个

@dolymood
Copy link
Member

这个地方可能会有点问题,但是目前的话,应该还是根据的状态码来决定是否已经上传了,且之后的文件也是采用采用相同的状态去判断的。这个我在下个大版本更新。

目前的话可以使用 processResponse 来强制更改。

@dolymood
Copy link
Member

issue 地址 simple-uploader/Uploader#38

@364124337
Copy link
Author

testChunks 为true 请求后,请求返回已上传块接口(xxx/mgr/getTaskProgress.do)不触发processResponse函数 ,更改不了状态码

@364124337
Copy link
Author

在checkChunkUploadedByResponse函数里边更改为args[0].file.chunks[0].xhr.status = 5050 这样不行

@dolymood
Copy link
Member

dolymood commented Feb 27, 2019

testChunks 为true 请求后,请求返回已上传块接口(xxx/mgr/getTaskProgress.do)不触发processResponse函数 ,更改不了状态码

在test的case下确实不行,修改 xhr status 肯定是不行的 因为不允许

这两天我更新下

@364124337
Copy link
Author

ok,think you!

@dolymood
Copy link
Member

0.7 解决了这个问题 checkChunkUploadedByResponse 会决定第一块上不上传也

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