Giter Site home page Giter Site logo

Comments (9)

neilxc avatar neilxc commented on August 16, 2024 2

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.

sconix avatar sconix commented on August 16, 2024

Like the error says you need to provide the url in the configuration.

from ngx-dropzone-wrapper.

gate3 avatar gate3 commented on August 16, 2024

from ngx-dropzone-wrapper.

sconix avatar sconix commented on August 16, 2024

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.

gate3 avatar gate3 commented on August 16, 2024

from ngx-dropzone-wrapper.

sconix avatar sconix commented on August 16, 2024

Ok, well hopefully somebody has an answer for you, but you might have better luck asking in Dropzone project.

from ngx-dropzone-wrapper.

sconix avatar sconix commented on August 16, 2024

This library sets the autoDiscover to false since it wont play well with Angular.

from ngx-dropzone-wrapper.

gate3 avatar gate3 commented on August 16, 2024

from ngx-dropzone-wrapper.

gate3 avatar gate3 commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.