diff --git a/templates/index.html b/templates/index.html index 043f4ba..15d15d4 100644 --- a/templates/index.html +++ b/templates/index.html @@ -393,6 +393,12 @@ evt.preventDefault(); }; + document.onpaste = function (event) { + const data = (event.clipboardData || event.originalEvent.clipboardData); + if(data.files.length === 0) return; + attachFileButton.textContent = "Attached: " + data.files[0].name; + hiddenFileButton.files = data.files; + } -{% include "footer.html" %} \ No newline at end of file +{% include "footer.html" %}