#include "tgbot/types/InputFile.h" #include "tgbot/tools/FileTools.h" #include #include #include namespace TgBot { InputFile::Ptr InputFile::fromFile(const std::string& filePath, const std::string& mimeType) { auto result(std::make_shared()); result->data = FileTools::read(filePath); result->mimeType = mimeType; result->fileName = std::filesystem::path(filePath).filename().string(); return result; } }