8 #ifndef CPPCMS_HTTP_FILE_H 9 #define CPPCMS_HTTP_FILE_H 11 #include <cppcms/defs.h> 12 #include <cppcms/cstdint.h> 13 #include <booster/hold_ptr.h> 14 #include <booster/nowide/fstream.h> 15 #include <booster/noncopyable.h> 22 namespace impl {
class multipart_parser; }
43 std::string name()
const;
47 std::string mime()
const;
52 bool has_mime()
const;
56 std::string filename()
const;
75 void output_file(std::string
const &name,
bool is_temporary =
false);
81 void make_permanent();
100 void save_to(std::string
const &filename);
104 void name(std::string
const &);
105 void mime(std::string
const &);
106 void filename(std::string
const &);
107 std::ostream &write_data();
118 void set_memory_limit(
size_t size);
123 void set_temporary_directory(std::string
const &dir);
130 std::string filename_;
134 std::stringstream res2_;
138 void save_by_copy(std::string
const &file_name,std::istream &in);
139 void copy_stream(std::istream &in,std::ostream &out);
142 uint32_t removed_ : 1 ;
143 uint32_t file_specified_ : 1;
144 uint32_t file_temporary_: 1;
145 uint32_t reserverd_ : 29;
This is the namespace where all CppCMS functionality is placed.
Definition: application.h:19
This class holds a uploaded file, it is generally fetched via widgets::file or via http::request::fil...
Definition: http_file.h:38
This class makes impossible to copy any class derived from this one.
Definition: noncopyable.h:15
basic_fstream< char > fstream
Definition: fstream.h:414
This class represents all information related to the HTTP/CGI request.
Definition: http_request.h:37