add support for file uploads in the file browser, optimise curl single thread download.

- curl now keeps the handle alive for single threaded downloads, rather than creating it each time.
This commit is contained in:
ITotalJustice
2025-05-18 23:00:51 +01:00
parent 71df5317be
commit eadc46b0e4
5 changed files with 144 additions and 121 deletions

View File

@@ -408,12 +408,7 @@ Result DumpNspToNetwork(ProgressBox* pbox, const location::Entry& loc, std::span
s64 offset{};
const auto result = curl::Api().FromMemory(
curl::Url{loc.url},
curl::UserPass{loc.user, loc.pass},
curl::Bearer{loc.bearer},
curl::PubKey{loc.pub_key},
curl::PrivKey{loc.priv_key},
curl::Port(loc.port),
CURL_LOCATION_TO_API(loc),
curl::OnProgress{pbox->OnDownloadProgressCallback()},
curl::UploadInfo{
e.path, e.nsp_size,