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

implementing multiple Dropzone config , how to open File dialog of Dropzone #122

Open
Nascooo opened this issue Dec 13, 2018 · 2 comments
Open
Labels

Comments

@Nascooo
Copy link

Nascooo commented Dec 13, 2018

i'm emplementing multiple dropzones as component in the same page with the same configuration but different methods name for each,

  • is that is right ?!
  • how to open file dialog (file Chooser) from the component.ts to upload to the dropzone .
@sconix
Copy link
Contributor

sconix commented Dec 13, 2018

I do not believe that dropzone has a function for opening file dialog, it might be even against browser security features. So only way to open file dialog afaik is for user to click the dropzone element.

@Nascooo
Copy link
Author

Nascooo commented Dec 13, 2018

i figure out a solution for it by using @ViewChild component of the dropzone and click on the clickable element
this.myViewChild.directiveRef.dropzone().clickableElements[0].click();
will open the file dialog

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

2 participants