Single file upload field. More...
#include <http.h>
Public Member Functions | |
FileParamSingle (const std::string &fname=std::string()) | |
If a file name is given, use its base name for storing the file; else, use the file name given by the client, without path. | |
virtual bool | read (net::mime::Reader &mime_reader, std::map< std::string, std::string > headers, const std::string &outdir, const std::string &fname_blacklist, const std::string &client_fname, int sock, const std::string &boundary, size_t inputsize) |
Handle a file upload from a multipart/form-data file upload part. | |
Public Attributes | |
FileInfo | info |
Single file upload field.
wibble::net::http::FileParamSingle::FileParamSingle | ( | const std::string & | fname = std::string() |
) |
If a file name is given, use its base name for storing the file; else, use the file name given by the client, without path.
References wibble::net::http::FileParam::FileInfo::fname, and info.
virtual bool wibble::net::http::FileParamSingle::read | ( | net::mime::Reader & | mime_reader, | |
std::map< std::string, std::string > | headers, | |||
const std::string & | outdir, | |||
const std::string & | fname_blacklist, | |||
const std::string & | client_fname, | |||
int | sock, | |||
const std::string & | boundary, | |||
size_t | inputsize | |||
) | [virtual] |
Handle a file upload from a multipart/form-data file upload part.
Implements wibble::net::http::FileParam.
Referenced by FileParamSingle().