-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
onUploadProgress is not triggering. #319
Comments
Hi @cihanbey211 - just confirming, are you using this in the browser or node? |
Hi sir, i couldn't get views on either side, is there a way you suggest? |
@perry-mitchell, I also have this issue. I'm using it in the browser, but it only triggers once when the upload is done. |
I'm not sure what could be happening here, though to be honest I've not really used those functions in my own projects. From what I've seen they are incredibly unstable and work for some while never for others. That and such methods are not available on the new Fetch standard. It's sad to say but these methods (upload/download progress) will disappear on v5 of this library, when I switch away from Axios (for Fetch). Progress will be possible to calculate by viewing the stream position when streaming files to or from the remote source, but not via normal options. I don't want to implement these myself (as they'd be problematic, just bloat for most people and only available reliably on the Node side). I'll leave this issue open if someone's interested in fixing this for V4 (not sure how that'd be possible, as we simply pass these properties on to Axios, so any bug is most likely there), but I'll close it when V5 is stable. |
Okay, thanks for the explanation! |
Confirmed with the latest set of changes - upload/download progress will be dropped. Using streams + middleware to measure progress is the best way, especially because streams are better than buffering an entire file beforehand (usually required to be able to know upload size, and therefore progress (total/percentage)). I'll try to add an example for this at some point. |
Hi everyone; Firstly thank you for this module. I need onUploadProgress trigger for big files, but not triggering. I need help yours about issue.
function uploadFile(client) { console.log('Start'); const file = fs.createReadStream("./video.mp4"); client.putFileContents("/video.mp4", file, { overwrite: false, onUploadProgress: progress => { console.log(progress); } }); }
The text was updated successfully, but these errors were encountered: