-
Notifications
You must be signed in to change notification settings - Fork 654
Open
Description
Hello everyone 👋,
I've been upgrading some old projects and went from ng2-file-upload v1.4.0 to v8.
I noticed that in version 1.4.0, there was a destroy() function available to properly clean up the uploader instance. However, in v8, this function no longer exists, and I couldn't find any reference on how to properly handle the cleanup.
Can someone guide me on the best approach to destroy or clean up the uploader instance in version 8?
Here's what I was doing before:
ngOnDestroy() {
this.uploader.destroy(); // ng2-file-upload@1.4.0
}And here's what I came up with so far for v8:
ngOnDestroy() {
this.uploader.clearQueue(); // Clear all remaining files in the queue
this.uploader = null; // Remove the reference
}Is this the recommended way? Should I be doing anything else to avoid memory leaks or unexpected behavior?
Thanks for any insights! 🙏
Metadata
Metadata
Assignees
Labels
No labels