From b5ac8f4d53cb13c0ee941c17ee796df86b39ba06 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Mon, 9 Oct 2023 09:55:06 +0200 Subject: [PATCH] Upload PUT read file in binary mode --- src/slic3r/Utils/Http.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/Utils/Http.cpp b/src/slic3r/Utils/Http.cpp index d41419ebf0..797207552c 100644 --- a/src/slic3r/Utils/Http.cpp +++ b/src/slic3r/Utils/Http.cpp @@ -314,7 +314,7 @@ void Http::priv::set_put_body(const fs::path &path) boost::system::error_code ec; boost::uintmax_t filesize = file_size(path, ec); if (!ec) { - putFile = std::make_unique(path); + putFile = std::make_unique(path, std::ios::binary); ::curl_easy_setopt(curl, CURLOPT_READDATA, (void *) (putFile.get())); ::curl_easy_setopt(curl, CURLOPT_INFILESIZE, filesize); }