mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-10 00:46:48 -06:00
WebUI: fix invalid method
The FileList type has no `entries()` method. Use the generic function from `Array` instead. Addresses https://github.com/qbittorrent/qBittorrent/pull/23182#discussion_r2319408410 Closes #23224.
This commit is contained in:
parent
463ac253fd
commit
0a9316382a
@ -176,7 +176,7 @@ window.qBittorrent.Client ??= (() => {
|
||||
const uploadTorrentFiles = (files) => {
|
||||
const fileNames = [];
|
||||
const formData = new FormData();
|
||||
for (const [i, file] of files.entries()) {
|
||||
for (const [i, file] of Array.prototype.entries.call(files)) {
|
||||
fileNames.push(file.name);
|
||||
// send dummy file name as file name won't be used and may not be encoded properly
|
||||
formData.append("file", file, i);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user