imagekit-developer / imagekit-javascript

Javascript SDK for using ImageKit.io
https://imagekit.io
77 stars 26 forks source link

How can i get the upload percentage #25

Closed raghavmri closed 2 years ago

raghavmri commented 4 years ago

I am using image kit-js to upload my profile pic images of my users but when they upload i wanna show them the percent they have uploaded is there any way to get that percentage

imagekitio commented 4 years ago

@gogamic Makes sense.

How about an event or callback method with upload progress?

How would you like to use it in your application?

raghavmri commented 4 years ago

@imagekitio indeed so I wanna display my users the progress of the upload

raghavmri commented 4 years ago

also any way I can contribute to this?

imagekitio commented 4 years ago

@gogamic sure. Please share the syntax of callback and data structure of response. Then you can proceed with actual implementation.

ghost commented 2 years ago

Will you simply expose the XHR in your API? This will also allow aborting the request if needed.

imagekitio commented 2 years ago

That sounds good. We will shortly release a new version with these changes.

imagekitio commented 2 years ago

https://github.com/imagekit-developer/imagekit-javascript#tracking-upload-progress-using-custom-xmlhttprequest