diff --git a/src/webui/www/private/rename_files.html b/src/webui/www/private/rename_files.html
index 4c4b9aaf0..bdfc46e75 100644
--- a/src/webui/www/private/rename_files.html
+++ b/src/webui/www/private/rename_files.html
@@ -4,8 +4,6 @@
QBT_TR(Renaming)QBT_TR[CONTEXT=TorrentContentTreeView]
-
-
diff --git a/src/webui/www/private/upload.html b/src/webui/www/private/upload.html
index 82a939884..ab2410627 100644
--- a/src/webui/www/private/upload.html
+++ b/src/webui/www/private/upload.html
@@ -6,7 +6,6 @@
QBT_TR(Upload local torrent)QBT_TR[CONTEXT=HttpServer]
-
@@ -175,7 +174,8 @@
window.parent.qBittorrent.Client.closeFrameWindow(window);
});
- if ((Browser.platform === "ios") || ((Browser.platform === "mac") && (navigator.maxTouchPoints > 1)))
+ const userAgent = (navigator.userAgentData?.platform ?? navigator.platform).toLowerCase();
+ if (userAgent.includes("ipad") || userAgent.includes("iphone") || (userAgent.includes("mac") && (navigator.maxTouchPoints > 1)))
document.getElementById("fileselect").accept = ".torrent";
window.qBittorrent.pathAutofill.attachPathAutofill();