mirror of
https://github.com/NaitLee/Cat-Printer.git
synced 2025-05-18 08:10:24 -07:00
main.js: only choose from image files
This commit is contained in:
parent
1b4402c6d2
commit
3afe5b5896
@ -391,6 +391,7 @@ class CanvasController {
|
|||||||
}
|
}
|
||||||
let input = document.createElement('input');
|
let input = document.createElement('input');
|
||||||
input.type = 'file';
|
input.type = 'file';
|
||||||
|
input.accept = 'image/*';
|
||||||
input.addEventListener('change', () => {
|
input.addEventListener('change', () => {
|
||||||
let url = URL.createObjectURL(input.files[0]);
|
let url = URL.createObjectURL(input.files[0]);
|
||||||
put_image(url);
|
put_image(url);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user