Fix ofstream API used to write an inserted image in the mobile app case

Change-Id: I67f8a74376a46f0cfd01ee4236960b29d4bc6372
This commit is contained in:
Tor Lillqvist 2018-11-29 15:07:42 +02:00
parent d564af04d6
commit ef18d2f493

View file

@ -822,7 +822,7 @@ bool ChildSession::insertFile(const char* /*buffer*/, int /*length*/, const std:
std::string tempFile = Util::createRandomTmpDir() + "/" + name;
std::ofstream fileStream;
fileStream.open(tempFile);
fileStream << binaryData.data();
fileStream.write(reinterpret_cast<char*>(binaryData.data()), binaryData.size());
fileStream.close();
url = "file://" + tempFile;
#endif