1
0
Fork 0
mirror of https://gitlab.com/hagrid-keyserver/hagrid.git synced 2023-02-13 20:55:02 -05:00
hagrid-keyserver--hagrid/dist/assets/js/upload.js

15 lines
376 B
JavaScript
Raw Normal View History

2019-08-13 11:24:25 -04:00
var body = document.getElementsByTagName("body")[0];
body.addEventListener('dragover', function(e) {
e.preventDefault();
e.stopPropagation();
}, false);
body.addEventListener('drop', function(e) {
e.preventDefault();
e.stopPropagation();
if (e.dataTransfer) {
document.getElementById('keytext').files = e.dataTransfer.files;
}
}, false);