From 0a9316382aad63d91a6b6408bdfc2cd073c01dac Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 7 Sep 2025 16:14:40 +0800 Subject: [PATCH] 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. --- src/webui/www/private/scripts/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js index 2c6126e6c..6e3144111 100644 --- a/src/webui/www/private/scripts/client.js +++ b/src/webui/www/private/scripts/client.js @@ -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);