1 diff --git a/src/slic3r/Utils/Http.cpp b/src/slic3r/Utils/Http.cpp
2 index 11a36dfabc..77a44e699b 100644
3 --- a/src/slic3r/Utils/Http.cpp
4 +++ b/src/slic3r/Utils/Http.cpp
5 @@ -88,9 +88,13 @@ std::mutex g_mutex;
11 boost::filesystem::ifstream::off_type init_offset;
12 size_t content_length;
14 + form_file(fs::path const& p, const boost::filesystem::ifstream::off_type offset, const size_t content_length)
15 + : ifs(p, std::ios::in | std::ios::binary), init_offset(offset), content_length(content_length)
20 @@ -314,7 +318,7 @@ void Http::priv::form_add_file(const char *name, const fs::path &path, const cha
21 filename = path.string().c_str();
24 - form_files.emplace_back(form_file{{path, std::ios::in | std::ios::binary}, offset, length});
25 + form_files.emplace_back(path, offset, length);
26 auto &f = form_files.back();
29 @@ -381,7 +385,7 @@ void Http::priv::set_put_body(const fs::path &path)
30 boost::system::error_code ec;
31 boost::uintmax_t filesize = file_size(path, ec);
33 - putFile = std::make_unique<form_file>(form_file{{path, std::ios_base::binary | std::ios_base::in}, 0, 0});
34 + putFile = std::make_unique<form_file>(path, 0, 0);
35 ::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
36 ::curl_easy_setopt(curl, CURLOPT_READDATA, (void *) (putFile.get()));
37 ::curl_easy_setopt(curl, CURLOPT_INFILESIZE, filesize);