From 6c772e650dc3c11cc07ef16d33f24d35bbd3cd7f Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Sat, 9 Aug 2025 18:08:59 -0700 Subject: [PATCH] WebAPI: Correctly handle uploaded files with non-ascii name --- src/webui/webapplication.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/webui/webapplication.cpp b/src/webui/webapplication.cpp index a28e002b5..2b860f2dd 100644 --- a/src/webui/webapplication.cpp +++ b/src/webui/webapplication.cpp @@ -356,7 +356,10 @@ void WebApplication::doProcessRequest() DataMap data; for (const Http::UploadedFile &torrent : request().files) - data[torrent.filename] = torrent.data; + { + const QString fileName = QString::fromUtf8(torrent.filename.toLatin1()); + data[fileName] = torrent.data; + } try {