mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 23:30:38 +08:00
Upload PUT read file in binary mode
This commit is contained in:
parent
6b94d09fe6
commit
b5ac8f4d53
@ -314,7 +314,7 @@ void Http::priv::set_put_body(const fs::path &path)
|
|||||||
boost::system::error_code ec;
|
boost::system::error_code ec;
|
||||||
boost::uintmax_t filesize = file_size(path, ec);
|
boost::uintmax_t filesize = file_size(path, ec);
|
||||||
if (!ec) {
|
if (!ec) {
|
||||||
putFile = std::make_unique<fs::ifstream>(path);
|
putFile = std::make_unique<fs::ifstream>(path, std::ios::binary);
|
||||||
::curl_easy_setopt(curl, CURLOPT_READDATA, (void *) (putFile.get()));
|
::curl_easy_setopt(curl, CURLOPT_READDATA, (void *) (putFile.get()));
|
||||||
::curl_easy_setopt(curl, CURLOPT_INFILESIZE, filesize);
|
::curl_easy_setopt(curl, CURLOPT_INFILESIZE, filesize);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user