RESTinio
Public Attributes | List of all members
restinio::file_upload::part_description_t Struct Reference

A description of one part with an uploaded file. More...

#include <file_upload.hpp>

Public Attributes

http_header_fields_t fields
 HTTP-fields local for that part. More...
 
string_view_t body
 The body of that part. More...
 
std::string name
 The value of Content-Disposition's 'name' parameter. More...
 
optional_t< std::string > filename_star
 The value of Content-Disposition's 'filename*' parameter. More...
 
optional_t< std::string > filename
 The value of Content-Disposition's 'filename' parameter. More...
 

Detailed Description

A description of one part with an uploaded file.

Note
Values of filename_star and filename are optional. But at least one of them won't be empty. Both of them can be non-empty.
Since
v.0.6.1

Definition at line 146 of file file_upload.hpp.

Member Data Documentation

◆ body

string_view_t restinio::file_upload::part_description_t::body

The body of that part.

Definition at line 155 of file file_upload.hpp.

◆ fields

http_header_fields_t restinio::file_upload::part_description_t::fields

HTTP-fields local for that part.

Note
It can be empty if no HTTP-fields are found for that part.

Definition at line 153 of file file_upload.hpp.

◆ filename

optional_t< std::string > restinio::file_upload::part_description_t::filename

The value of Content-Disposition's 'filename' parameter.

This field has the value only of 'filename' parameter was found in Content-Disposition field.

Definition at line 175 of file file_upload.hpp.

◆ filename_star

optional_t< std::string > restinio::file_upload::part_description_t::filename_star

The value of Content-Disposition's 'filename*' parameter.

This field has the value only of 'filename*' parameter was found in Content-Disposition field.

Attention
If that field is presend then it is the original value extracted from Content-Disposition without any transformation. It means that this field will hold values defined in RFC5987 like: utf-8'en-US'A%20some%20filename.txt

Definition at line 169 of file file_upload.hpp.

◆ name

std::string restinio::file_upload::part_description_t::name

The value of Content-Disposition's 'name' parameter.

Definition at line 157 of file file_upload.hpp.


The documentation for this struct was generated from the following file: