fix in folder upload

This commit is contained in:
sanjayk03-dev
2024-05-04 04:48:37 +05:30
parent 78f200064b
commit 8cad5169c3

View File

@@ -485,6 +485,7 @@ module.exports = {
folder_to_add.files.push({ file_name: file.name }); folder_to_add.files.push({ file_name: file.name });
} }
} }
this.save_config(this.config);
}; };
reader.onerror = error => { reader.onerror = error => {
@@ -497,7 +498,6 @@ module.exports = {
}; };
reader.readAsText(file, "utf-8"); reader.readAsText(file, "utf-8");
} }
this.save_config();
}, },
upload_file: async function (e) { upload_file: async function (e) {
@@ -521,7 +521,6 @@ module.exports = {
this.filesUploaded++; this.filesUploaded++;
if (this.filesUploaded == this.totalFiles) { if (this.filesUploaded == this.totalFiles) {
this.uploadFiles = false; this.uploadFiles = false;
this.save_config(this.config);
} }
if (xhr.status >= 200 && xhr.status < 300) { if (xhr.status >= 200 && xhr.status < 300) {
console.log("File uploaded " + filename); console.log("File uploaded " + filename);