add support for pasting files

This commit is contained in:
neri 2022-04-13 18:41:24 +02:00
parent 6601e719c9
commit 29add89e3d
3 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "datatrash" name = "datatrash"
version = "1.0.0" version = "1.1.0"
authors = ["neri"] authors = ["neri"]
edition = "2021" edition = "2021"

4
static/paste.js Normal file
View File

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

View File

@ -68,5 +68,6 @@ authentifizieren
repo repo
</a> </a>
</footer> </footer>
<script src="/static/paste.js" lang="javascript"></script>
</body> </body>
</html> </html>