Comments (9)
I had the same issue with the Dropzone already attached. I had to import Dropzone and add the Dropzone.autoDiscover flag to false in the constructor (or on init). This resolves the error. The URL error will go away if you specify a URL in the config.
public config: DropzoneConfigInterface = {
url: `http://localhost:5000/api/users/${this.authService.decodedToken.nameid}/photos`,
clickable: true,
maxFiles: 2,
autoReset: null,
errorReset: null,
cancelReset: null,
headers: {'Authorization': 'Bearer ' + this.token}
};
constructor(private authService: AuthService) {
Dropzone.autoDiscover = false;
}
Don't forget to import Dropzone:
import * as Dropzone from 'dropzone';
from ngx-dropzone-wrapper.
Like the error says you need to provide the url in the configuration.
from ngx-dropzone-wrapper.
from ngx-dropzone-wrapper.
I don't know if Dropzone can be used in such way, but you can look into Dropzone documentation / ask in its issues if such thing is possible.
from ngx-dropzone-wrapper.
from ngx-dropzone-wrapper.
Ok, well hopefully somebody has an answer for you, but you might have better luck asking in Dropzone project.
from ngx-dropzone-wrapper.
This library sets the autoDiscover to false since it wont play well with Angular.
from ngx-dropzone-wrapper.
from ngx-dropzone-wrapper.
Hi @neilxc thanks so much. Your suggestion worked, I also specified a string 'no-url' as the url. @sconix Thanks a lot for the attempt. Much appreciated. God bless
from ngx-dropzone-wrapper.
Related Issues (20)
- New 5.6.0 version of dropzone causing build errors with all versions of ngx-dropzone-wrapper HOT 3
- Ngxs with dropzone
- Remove file link resets entire form HOT 1
- how to pass filename on parameter HOT 1
- orientation not working when uploading an image only in chrome browser. HOT 1
- how to stop the upload
- Unsupported DropzoneEvents
- Support for Angular 10 HOT 2
- DropzoneHeadersFunction action not working
- TypeError: dropzone__WEBPACK_IMPORTED_MODULE_1__ is not a constructor HOT 17
- addedFile/addedFiles missing from DropzoneConfigInterface?
- Images sent directly from mobile get rotated by 90 degrees. HOT 1
- Problem with ssr self is not defined HOT 6
- OnAddedFile event not fired in version 10.0.1 HOT 1
- Generating browser application bundles (phase: setup)...Processing legacy "View Engine" libraries HOT 1
- Can't import the named export 'CommonModule' from non EcmaScript module (only default export is available) HOT 1
- Generic type 'eeDirectiveDeclaration' HOT 1
- How to overwrite the confirm function?
- Action Delete Image
- Directive has console.log since version 15.0.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-dropzone-wrapper.