I handle the file entered in an input type "file" so:
<input id="upload_button" type="file"/>
And then:
var handleFileSelect = function(evt) {
var target = evt.dataTransfer || evt.target;
var file = target && target.files && target.files[0];
(...)
};
angular.element(document.querySelector('#upload_button')).on('change', handleFileSelect);`
As you can see document.querySelector('#upload_button').on('change', handleFileSelect);
.
But I would like to do the same with a drag & drop div:
<div class="drop-zone" id="upload_drop" >
<img src="../images/icon_cloud.png"/>
<font class="receipt_upload_font"> Beleg per Drag & Drop hinzufügen</font>
<font class="receipt_upload_oder_font"> oder unten "Beleg hinzufügen" klicken und Datei auswählen</font>
</div>`
But I don't know how to do it. :( I can't handle the dropped file in the div as the input.