main.js: only choose from image files

This commit is contained in:
Andy Piper 2022-05-04 21:59:16 +01:00
parent 1b4402c6d2
commit 3afe5b5896
No known key found for this signature in database
GPG Key ID: 8FBF7373AC449A7F

View File

@ -391,6 +391,7 @@ class CanvasController {
}
let input = document.createElement('input');
input.type = 'file';
input.accept = 'image/*';
input.addEventListener('change', () => {
let url = URL.createObjectURL(input.files[0]);
put_image(url);