This commit is contained in:
Ross
2021-11-06 18:48:12 +00:00
parent 8f16893ff7
commit 3298192817
+6 -8
View File
@@ -274,9 +274,9 @@
current_files = getCurrentFiles(); current_files = getCurrentFiles();
current_files_tuple = new Set() current_files_tuple = new Set()
for (let elem of current_files) { for (let elem of current_files) {
current_files_tuple.add([elem.size, elem.name, current_files_tuple.add(
elem.lastModified `${elem.size}, ${elem.name}, ${elem.lastModified}`
]); );
} }
console.log(current_files_tuple) console.log(current_files_tuple)
@@ -284,9 +284,9 @@
f = await items[i].handle.getFile() f = await items[i].handle.getFile()
console.log("f", f) console.log("f", f)
if (!current_files_tuple.has([f.size, f.name, f if (!current_files_tuple.has(
.lastModified `${f.size}, ${f.name}, ${f.lastModified}`
])) { )) {
files_to_add.add(f); files_to_add.add(f);
} }
} }
@@ -471,7 +471,6 @@
image.title = file.name; image.title = file.name;
image.src = reader.result; image.src = reader.result;
image.className = "temp-thumb"; image.className = "temp-thumb";
console.log("read", reader, el);
$(el).parent().parent().find(".temp-thumb").remove(); $(el).parent().parent().find(".temp-thumb").remove();
$(el).parent().parent().prepend(image); $(el).parent().parent().prepend(image);
//images.push(reader.result); //images.push(reader.result);
@@ -491,7 +490,6 @@
file_set.each(async (n, el) => { file_set.each(async (n, el) => {
console.log(el);
if (el.files.length > 0) { if (el.files.length > 0) {
filename = el.files[0].name; filename = el.files[0].name;
// Probably no need to await here anymore // Probably no need to await here anymore