ngx-upload icon indicating copy to clipboard operation
ngx-upload copied to clipboard

Possibility of (fileSelected) event on ngxDragAndDrop

Open mrklika opened this issue 4 years ago • 1 comments

Hi, is there any possibility of adding some helper outputs like fileSelected on ngxDragAndDrop?

Assume that I have one form with 2 instances of fileSelect:

       <div
        class="my-drop-zone"
        ngxDragAndDrop
        *ngxInputFile>
        <span class="__drop-text">Click to select...</span>
      </div>
       <div
        class="my-drop-zone"
        ngxDragAndDrop
        *ngxInputFile>
        <span class="__drop-text">Click to select...</span>
      </div>

and I want to store my files in the file queue by keys like:

coverImage: [ FILE ]

gallery: [ FILE, FILE, FILE ]

only available available this._uploader.onAddToQueue$ listens to queue without the option to focus on a single file drop or select.

Would be great to have something like:

       <div
        class="my-drop-zone"
        ngxDragAndDrop
        *ngxInputFile
       (fileSelected)="addToQueue({ key: 'coverImage', file: $event })">
        <span class="__drop-text">Click to select...</span>
      </div>

mrklika avatar Oct 28 '20 14:10 mrklika

Hi @mrklika, Seems interesting. I'll try to do that the next week.

wKoza avatar Nov 15 '20 09:11 wKoza