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