datatrash/static/paste.js

5 lines
145 B
JavaScript

const fileInput = document.getElementById("file-upload");
window.addEventListener('paste', e => {
fileInput.files = e.clipboardData.files;
});