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

Dropzone autoDiscovery is on? #134

Closed
daniel-bikemap opened this issue Apr 26, 2019 · 1 comment
Closed

Dropzone autoDiscovery is on? #134

daniel-bikemap opened this issue Apr 26, 2019 · 1 comment
Labels

Comments

@daniel-bikemap
Copy link

As discussed in #129, autoDiscovery should be off. Still, I get an error when initializing dropzone using ngx-dropzone-wrapper:

Error: No URL provided. vendor.js line 341 > eval:1066:13
    Dropzone dropzone.js:1066
    discover dropzone.js:2968
    discover dropzone.js:2950
    _autoDiscoverFunction dropzone.js:3516
    init dropzone.js:3484

I opted for component usage for the preview image functionality and I provide the URL (along with all the other config) via ngOnInit() since the URL depends on outside factors. I tried providing an mock URL in app.modules.ts, but the error persists.

Is this a bug, or am I holding it wrong? Running on Angular 7.2.10 with ngx-dropzone-wrapper 7.2.1

@sconix
Copy link
Contributor

sconix commented Apr 26, 2019

Have you tried doing it in AfterViewInit? The Dropzone is a JS library so it operates in DOM space so I suspect that there might be weird errors sometimes when updating it if DOM is not ready.

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