tgbot-cpp
Loading...
Searching...
No Matches
InputFile.h
Go to the documentation of this file.
1#pragma once
2
3#include "tgbot/export.h"
4
5#include <memory>
6#include <string>
7
8namespace TgBot {
9
16public:
17 using Ptr = std::shared_ptr<InputFile>;
18
22 std::string data;
23
27 std::string mimeType;
28
32 std::string fileName;
33
37 static std::shared_ptr<InputFile> fromFile(const std::string& filePath, const std::string& mimeType);
38};
39
40} // namespace TgBot
This object represents the contents of a file to be uploaded.
Definition InputFile.h:15
std::string mimeType
Mime type of a file.
Definition InputFile.h:27
static std::shared_ptr< InputFile > fromFile(const std::string &filePath, const std::string &mimeType)
Creates new std::shared_ptr<InputFile> from an existing file.
std::string data
Contents of a file.
Definition InputFile.h:22
std::shared_ptr< InputFile > Ptr
Definition InputFile.h:17
std::string fileName
File name.
Definition InputFile.h:32
#define TGBOT_API
Definition export.h:5
Definition Api.h:17