We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9d1990 commit acde804Copy full SHA for acde804
1 file changed
lib/src/HttpFileImpl.cc
@@ -113,7 +113,8 @@ int HttpFileImpl::saveTo(
113
{
114
LOG_TRACE << "save uploaded file:" << pathAndFileName;
115
auto wPath = utils::toNativePath(pathAndFileName.native());
116
- std::ofstream file(wPath, std::ios::binary);
+ std::ofstream file(wPath,
117
+ std::ios::binary | std::ios::out | std::ios::trunc);
118
if (file.is_open())
119
120
file.write(fileContent_.data(), fileContent_.size());
0 commit comments