zefoy / ngx-dropzone-wrapper

Angular wrapper library for Dropzone
MIT License
174 stars 51 forks source link

How should I display default image #113

Closed xoco70 closed 6 years ago

xoco70 commented 6 years ago

Hi,

I would like to display the current avatar inside dropzone.

With the original component, I would do:

myDropzone.on("addedfile", function(file) {
  if (!file.type.match(/image.*/)) {
    myDropzone.emit("thumbnail", file, "http://path/to/image");
  }
});

But I don't know how should I do it with Angular...

sconix commented 6 years ago

You can do everything like with the original component if you like. This is just a wrapper and only initializes dropzone with given config options. The directive offers method for getting the dropzone instance which can be used exactly like orginal dropzone.