download pictures in the frontend and then create data-urls from blobs

This commit is contained in:
Johannes Heuel
2023-03-08 15:03:36 +01:00
parent fbcea9e77b
commit db2bf1994e
14 changed files with 500 additions and 165 deletions

View File

@@ -5,7 +5,7 @@ function getFilesDataTransferItems(dataTransferItems) {
// nothing to do
} else if (item.isFile) {
item.file(file => {
file.filepath = path + "/" + file.name; //save full path
file.filepath = path + file.name; //save full path
folder.push(file);
resolve(file);
});
@@ -17,7 +17,7 @@ function getFilesDataTransferItems(dataTransferItems) {
folder.push({ name: item.name, subfolder: subfolder });
for (let entry of entries)
entriesPromises.push(
traverseFileTreePromise(entry, path + "/" + item.name, subfolder)
traverseFileTreePromise(entry, path + "/" + item.name + "/", subfolder)
);
resolve(Promise.all(entriesPromises));
});