|
|
@ -1,5 +1,7 @@
|
|
|
|
#include "webcc/common.h"
|
|
|
|
#include "webcc/common.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <codecvt>
|
|
|
|
|
|
|
|
|
|
|
|
#include "boost/algorithm/string.hpp"
|
|
|
|
#include "boost/algorithm/string.hpp"
|
|
|
|
#include "boost/filesystem/fstream.hpp"
|
|
|
|
#include "boost/filesystem/fstream.hpp"
|
|
|
|
|
|
|
|
|
|
|
@ -215,8 +217,8 @@ FormPart::FormPart(const std::string& name, const Path& path,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Determine file name from file path.
|
|
|
|
// Determine file name from file path.
|
|
|
|
// TODO: Encoding
|
|
|
|
// TODO: encoding
|
|
|
|
file_name_ = path.filename().string();
|
|
|
|
file_name_ = path.filename().string(std::codecvt_utf8<wchar_t>());
|
|
|
|
|
|
|
|
|
|
|
|
// Determine content type from file extension.
|
|
|
|
// Determine content type from file extension.
|
|
|
|
if (mime_type_.empty()) {
|
|
|
|
if (mime_type_.empty()) {
|
|
|
|