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

How to catch #1397

Closed
Sunshine168 opened this issue Apr 1, 2019 · 3 comments
Closed

How to catch #1397

Sunshine168 opened this issue Apr 1, 2019 · 3 comments
Labels
Not Accepted We cannot accept this issue, please read https://uppy.io/support

Comments

@Sunshine168
Copy link

version @uppy/core 0.29

https://github.com/transloadit/uppy/blob/master/packages/%40uppy/core/src/index.js#L342

how to catch or listen restrictions error ?

@Sunshine168 Sunshine168 added the Not Accepted We cannot accept this issue, please read https://uppy.io/support label Apr 1, 2019
@goto-bus-stop
Copy link
Contributor

For programmatic use, you can do:

try {
  uppy.addFile(aFileThatDoesNotPassRestrictions)
} catch (err) {
  // handle it
}

@Sunshine168
Copy link
Author

Thanks ! but it may become a event will be better or show more detail in doc~

@arturi
Copy link
Contributor

arturi commented Apr 11, 2019

There’s now an event (will be available once new version of uppy is published on npm): #1436.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Not Accepted We cannot accept this issue, please read https://uppy.io/support
Projects
None yet
Development

No branches or pull requests

3 participants