Made this for my PRUSA MINI with a Raspberry Pi Zero 2W and a Raspi Cam v1.3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Trigger a file open dialog and read local file, then read and log the file contents | |
*/ | |
var element = document.createElement('div'); | |
element.innerHTML = '<input type="file">'; | |
var fileInput = element.firstChild; | |
fileInput.addEventListener('change', function() { | |
var file = fileInput.files[0]; |