14 #include <restinio/helpers/http_field_parsers/content-type.hpp> 15 #include <restinio/helpers/http_field_parsers/content-disposition.hpp> 16 #include <restinio/helpers/multipart_body.hpp> 18 #include <restinio/http_headers.hpp> 19 #include <restinio/request_handler.hpp> 20 #include <restinio/expected.hpp> 282 template<
typename T >
358 template<
typename Extra_Data,
typename Handler >
373 "Handler should be callable object, " 374 "should accept part_description_t by value, const or rvalue reference, " 375 "and should return handling_result_t" );
std::string name
The value of Content-Disposition's 'name' parameter.
Unable to parse Content-Disposition field.
RESTINIO_NODISCARD expected_t< part_description_t, enumeration_error_t > analyze_part(restinio::multipart_body::parsed_part_t parsed_part)
Helper function for analyzing an already parsed part of a multipart body for presence of an uploaded ...
A description of one part with an uploaded file.
optional_t< std::string > filename
The value of Content-Disposition's 'filename' parameter.
Content-Type field is not found. If Content-Type is absent there is no way to detect 'boundary' param...
Content-Type field value parsed but doesn't contain an appropriate value. For example there can be me...
string_view_t body
The body of that part.
Unable to parse Content-Type field value.
Enumeration of parts was aborted by user-provided handler. This code is returned when user-provided h...
RESTINIO_NODISCARD constexpr enumeration_error_t translate_enumeration_error(restinio::multipart_body::enumeration_error_t original)
Helper function for conversion from one enumeration_error to another.
optional_t< std::string > filename_star
The value of Content-Disposition's 'filename*' parameter.
No files found in the current part. For example, there is no Content-Disposition field for that part...
Content-Disposition field value parsed but doesn't contain an appropriate value. For example...
enumeration_error_t
The result of an attempt to enumerate parts of a multipart body that contains uploaded file...
Some unexpected error encountered during the enumeration.
http_header_fields_t fields
HTTP-fields local for that part.
expected_t< std::size_t, enumeration_error_t > enumerate_parts_with_files(const generic_request_t< Extra_Data > &req, Handler &&handler, string_view_t expected_media_type=string_view_t{"multipart"}, string_view_t expected_media_subtype=string_view_t{"form-data"})
A helper function for enumeration of parts of a multipart body those contain uploaded files...
No parts of a multipart body actually found.
Value of 'boundary' parameter is invalid (for example it contains some illegal characters).
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, optional_t< Value_Type > >::type opt_value(const Parameter_Container ¶ms, string_view_t key)
Gets the value of a parameter specified by key wrapped in optional_t<Value_Type> if parameter exists ...