#include <drogon/UploadFile.h>
|
| | UploadFile (const std::string &filePath, const std::string &fileName="", const std::string &itemName="file", ContentType contentType=CT_NONE) |
| | Constructor.
|
| | UploadFile (const void *data, const size_t len, const std::string &fileName="memory.bin", const std::string &itemName="file", ContentType contentType=CT_APPLICATION_OCTET_STREAM) |
| | Constructor.
|
|
const std::string & | path () const |
|
const std::string & | fileName () const |
|
const std::string & | itemName () const |
|
ContentType | contentType () const |
|
const void * | data () const |
|
size_t | dataLength () const |
This class represents an upload file which will be transferred to the server via the multipart/form-data format
◆ UploadFile() [1/2]
| drogon::UploadFile::UploadFile |
( |
const std::string & | filePath, |
|
|
const std::string & | fileName = "", |
|
|
const std::string & | itemName = "file", |
|
|
ContentType | contentType = CT_NONE ) |
|
inlineexplicit |
Constructor.
- Parameters
-
| filePath | The file location on local host, including file name. |
| fileName | The file name provided to the server. If it is empty by default, the file name in the filePath is provided to the server. |
| itemName | The item name on the browser form. |
| contentType | The Mime content type for the part |
◆ UploadFile() [2/2]
| drogon::UploadFile::UploadFile |
( |
const void * | data, |
|
|
const size_t | len, |
|
|
const std::string & | fileName = "memory.bin", |
|
|
const std::string & | itemName = "file", |
|
|
ContentType | contentType = CT_APPLICATION_OCTET_STREAM ) |
|
inlineexplicit |
Constructor.
- Parameters
-
| data | Pointer to the data |
| len | Data length in bytes |
| fileName | The file name provided to the server. |
| itemName | The item name on the browser form. |
| contentType | The Mime content type for the part |
The documentation for this class was generated from the following file: