Spaces:
Running
Running
Update index.html
Browse files- index.html +6 -3
index.html
CHANGED
@@ -166,9 +166,12 @@
|
|
166 |
fileInput.addEventListener('change', async ({ target: { files } }) => {
|
167 |
if (!files.length) return;
|
168 |
imageHandles = Array.from(files).map(file => ({ getFile: async () => file, kind: 'file', name: file.name }));
|
169 |
-
|
170 |
-
|
171 |
-
|
|
|
|
|
|
|
172 |
});
|
173 |
|
174 |
async function loadImagesFromHandles() {
|
|
|
166 |
fileInput.addEventListener('change', async ({ target: { files } }) => {
|
167 |
if (!files.length) return;
|
168 |
imageHandles = Array.from(files).map(file => ({ getFile: async () => file, kind: 'file', name: file.name }));
|
169 |
+
for (const handle of imageHandles) {
|
170 |
+
const file = await handle.getFile();
|
171 |
+
const dataUrl = await fileToDataUrl(file);
|
172 |
+
window.testImages.push(dataUrl);
|
173 |
+
}
|
174 |
+
updateTable();
|
175 |
});
|
176 |
|
177 |
async function loadImagesFromHandles() {
|