Skip to content
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

Question: Is there any API to make Uppy clear its localStorage? #179

Closed
mohammadbhuyan opened this issue Apr 21, 2017 · 5 comments
Closed
Labels

Comments

@mohammadbhuyan
Copy link

Lets say that I want to force uppy to forget what it was doing?

@arturi
Copy link
Contributor

arturi commented May 4, 2017

What is that Uppy stores in localStorage for you? By default it shouldn’t. If remember correctly, Local Storage is currently used: 1. if you add a PersistentState plugin or 2. In examples, for their settings: https://uppy.io/examples/dashboard/.

@arturi arturi added the Question label May 4, 2017
@arturi
Copy link
Contributor

arturi commented May 10, 2017

Or perhaps you are talking about something like this: https://github.com/transloadit/content/pull/281. We should look into adding a smart reset method that will clear files, meta and other things, while keeping installed plugins, what do you think @goto-bus-stop, good idea? Maybe its already implemented somewhere and I’m overlooking 😱 . But this is different to #182, which is also very cool.

@goto-bus-stop
Copy link
Contributor

Yeah, #182 was mostly for #162. A reset thing would be useful, too.

@arturi
Copy link
Contributor

arturi commented Jul 3, 2017

An uppy.reset() has been added in 0.17: https://www.npmjs.com/package/uppy. When you call .reset() on an Uppy instance, it should clear all files, including canceling uploads in progress, set progress to 0, thus, well reseting everything. Let me know if this helps!

@wissem2908
Copy link

you can use uppy.reset()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants