fix: use HTTPClient::writeToStream for downloading files from OPDS (#1207)
## Summary * Refactored `HttpDownloader::downloadToFile` to use `FileWriteStream` and `HTTPClient::writeToStream`, removing manual chunked downloading logic, which was error-prone. * Fixes https://github.com/crosspoint-reader/crosspoint-reader/issues/632 ## Additional Context * Tested downloading files from OPDS with a size up to 10 mb. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**< YES >**_
This commit is contained in:
committed by
GitHub
parent
6ff5fcd9a7
commit
45a228a645
@@ -38,7 +38,4 @@ class HttpDownloader {
|
||||
*/
|
||||
static DownloadError downloadToFile(const std::string& url, const std::string& destPath,
|
||||
ProgressCallback progress = nullptr);
|
||||
|
||||
private:
|
||||
static constexpr size_t DOWNLOAD_CHUNK_SIZE = 1024;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user