Adds support to the FILES_SIZES variable

This commit is contained in:
Felipe Zimmerle
2015-07-17 15:46:54 -03:00
parent ebb16d0439
commit b6cccc798a
2 changed files with 65 additions and 0 deletions

View File

@@ -212,6 +212,8 @@ bool Multipart::process(std::string data) {
if (m.filename.empty() == false) {
variables.emplace("FILES:" + m.name, m.filename);
variables.emplace("FILES_NAMES:" + m.name, m.name);
variables.emplace("FILES_SIZES:" + m.name,
std::to_string(m.content.size()));
files_size = files_size + m.content.size();
}
}