File uploads in note creator

This commit is contained in:
2023-01-03 16:55:51 +00:00
parent bc082ec203
commit 554859f4b6
5 changed files with 62 additions and 20 deletions

11
src/Util.js Normal file
View File

@ -0,0 +1,11 @@
export async function openFile() {
return new Promise((resolve, reject) => {
let elm = document.createElement("input");
elm.type = "file";
elm.onchange = (e) => {
resolve(e.target.files[0]);
};
elm.click();
});
}