You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What problem are you trying to solve? Describe the feature.
Currently, there is no way to remove event listeners, e.g., for uploadProgress event.
constongoingRequestPromise=gotChunkInstance.post(uploadUrl,{body: awaitchunkStreamProvider.getChunkStream()//this is an FS ReadStream});consteventListener=(progress: Progress)=>{console.log(progress);};ongoingRequestPromise.on("uploadProgress",eventListener);setTimeout(()=>{// This is not possibleongoingRequestPromise.removeEventListener("uploadProgress",eventListener);},2000);
Checklist
I have read the documentation and made sure this feature doesn't already exist.
The text was updated successfully, but these errors were encountered:
constongoingRequestPromise=gotChunkInstance.post(uploadUrl,{body: awaitchunkStreamProvider.getChunkStream()//this is an FS ReadStream});letstopListening=false;consteventListener=(progress: Progress)=>{if(stopListening)return;console.log(progress);};ongoingRequestPromise.on("uploadProgress",eventListener);setTimeout(()=>{stopListening=true;},2000);
Yes, I can but that doesn't look perfect... I would rather prefer to just unregister the listener :)
What problem are you trying to solve? Describe the feature.
Currently, there is no way to remove event listeners, e.g., for
uploadProgress
event.Checklist
The text was updated successfully, but these errors were encountered: