Use correct chunk size in Outlook365 channel

dependabot/npm_and_yarn/Src/WebController/UI/websocket-extensions-0.1.4
Pawel Kurowski 2020-05-13 09:56:47 +02:00
parent d48eb8f02d
commit f0d79a4683
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ size_t FSecure::C3::Interfaces::Channels::Outlook365RestTask::OnSendToChannel(By
auto chunkSize = std::min<size_t>(data.size(), 3 * 1024 * 1024); // Send max 4 MB. base64 will expand data by 4/3.
auto fileData = json();
fileData[OBF("Subject")] = m_OutboundDirectionName;
fileData[OBF("Body")][OBF("Content")] = cppcodec::base64_rfc4648::encode(&data.front(), data.size());
fileData[OBF("Body")][OBF("Content")] = cppcodec::base64_rfc4648::encode(&data.front(), chunkSize);
fileData[OBF("Body")][OBF("ContentType")] = OBF("Text");
auto body = fileData.dump();