mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
WebAPI: Correctly handle uploaded files with non-ascii name
This commit is contained in:
parent
02892d1250
commit
6c772e650d
1 changed files with 4 additions and 1 deletions
|
@ -356,7 +356,10 @@ void WebApplication::doProcessRequest()
|
||||||
|
|
||||||
DataMap data;
|
DataMap data;
|
||||||
for (const Http::UploadedFile &torrent : request().files)
|
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
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue