Skip to content

Commit acde804

Browse files
committed
flag
1 parent d9d1990 commit acde804

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/src/HttpFileImpl.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ int HttpFileImpl::saveTo(
113113
{
114114
LOG_TRACE << "save uploaded file:" << pathAndFileName;
115115
auto wPath = utils::toNativePath(pathAndFileName.native());
116-
std::ofstream file(wPath, std::ios::binary);
116+
std::ofstream file(wPath,
117+
std::ios::binary | std::ios::out | std::ios::trunc);
117118
if (file.is_open())
118119
{
119120
file.write(fileContent_.data(), fileContent_.size());

0 commit comments

Comments
 (0)