Rewrite some stuff
This commit is contained in:
parent
0a19b9a778
commit
c41e3c2049
@ -552,10 +552,9 @@ async function uploadFile() {
|
||||
let data = {
|
||||
action: "uploadFiles"
|
||||
};
|
||||
let i = 1;
|
||||
fileInput.files.forEach((file) => {
|
||||
data[`userFile${i}`] = file;
|
||||
});
|
||||
for (let i = 0; i < fileInput.files.length; i++) {
|
||||
data[`userFile${i}`] = fileInput.files[i];
|
||||
}
|
||||
await doAction("/upload", data, "Súbor bol úspešne nahraný", "Nastala chyba pri nahrávaní súboru", false);
|
||||
fileInput.reset();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user