peterfreeman / ngx-dropzone

A highly configurable dropzone component for Angular.
133 stars 59 forks source link

readFile() promise not being executed inside NgZone? #128

Closed nicolas-garcia-kintai closed 2 years ago

nicolas-garcia-kintai commented 2 years ago

Hello everyone,

I noticed there is some kind of problem when readFile() method is resolved.

I created a custom preview component where i preview image type files. But when an image type file is selected, the image preview is not being shown automatically, I have to explicitly detect changes using ChangeDetectorRef for the image preview to show up.

So I think that maybe the promise that handles the FileReader is not working correctly? Is there a way to do this without using ChangeDetectorRef?

peterfreeman commented 2 years ago

Hi @nicolas-garcia-kintai,

this is a known issue, please refer to #95 for further info. For now, please use the ChangeDetector, the next major update is still WIP.

Happy coding! 🤓