It’s pretty straightforward. Just catch paste event on window object and put all the files you got from it to the <input> tag.
const form = document.getElementById("new_document_attachment");
const fileInput = document.getElementById("document_attachment_doc");
fileInput.addEventListener('change', () => {
form.submit();
});
window.addEventListener('paste', e => {
fileInput.files = e.clipboardData.files;
});
<form id="new_document_attachment" method="post" enctype="multipart/form-data">
<div class="actions"><input type="submit" name="commit" value="Submit" /></div>
<input type="file" name="document_attachment_doc" id="document_attachment_doc" />
</form>