1.4.1
Google Chrome 59.0.3071.86
2.4.2
https://jsfiddle.net/vqvng7xy/
just upload by method " put ", but the progress doesn't has percent。
https://github.com/ElemeFE/element/blob/dev/packages/upload/src/index.vue
on line 141
handleProgress(ev, rawFile) {
var file = this.getFile(rawFile);
this.onProgress(ev, file, this.uploadFiles);
file.status = 'uploading';
file.percentage = ev.percent || 0;
},
I want to set " this.onProgress(ev, file, this.uploadFiles); " after set file.percentage,
or set " file.percentage = ev.loaded / ev.total * 100 " ;
I set the ajax method: "put", but the onProgress doesn't has the percent attribute。
Use others Ajax Library ,you can check what is the problem.may be axios?
It's not Ajax Library problem。 element use it's native ajax(https://github.com/ElemeFE/element/blob/dev/packages/upload/src/ajax.js),in the line42,it set it's own attribute percent。 But now I use axios to put my xhr, it didn't find percent attribute so the percent attribute is also 0%。
help me !
@thandonguocmo2020 what?
I shot xhr it has no upload process.
I put data file up by default. But the process runs 100% before processing is done on the server. Please show me how to fix it.
@thandonguocmo2020 I use 'post' method to solve this problem。 But if you have to use 'put' method, please download the upload component,rewrite https://github.com/ElemeFE/element/blob/dev/packages/upload/src/ajax.js#L70 'post' to 'put'
请问,解决了吗,我也遇到了
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
It's not Ajax Library problem。 element use it's native ajax(https://github.com/ElemeFE/element/blob/dev/packages/upload/src/ajax.js),in the line42,it set it's own attribute percent。 But now I use axios to put my xhr, it didn't find percent attribute so the percent attribute is also 0%。