datatrash/static/paste.js

5 lines
145 B
JavaScript
Raw Normal View History

2022-04-13 16:41:24 +00:00
const fileInput = document.getElementById("file-upload");
window.addEventListener('paste', e => {
fileInput.files = e.clipboardData.files;
});