Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
Loading...
Searching...
No Matches
orbit::http::MultipartUpload Struct Reference

The result of receive_multipart(). More...

#include <MultipartUpload.hpp>

Public Member Functions

bool ok () const
 
void discard ()
 Deletes every saved file (for example after rejecting the upload).
 

Public Attributes

std::unordered_map< std::string, std::string > fields
 
std::vector< UploadedFile > files
 
std::string error
 Empty on success. On failure no files are left on disk.
 

Detailed Description

The result of receive_multipart().

Member Function Documentation

◆ discard()

void orbit::http::MultipartUpload::discard ( )

Deletes every saved file (for example after rejecting the upload).

◆ ok()

bool orbit::http::MultipartUpload::ok ( ) const
inline

Member Data Documentation

◆ error

std::string orbit::http::MultipartUpload::error

Empty on success. On failure no files are left on disk.

◆ fields

std::unordered_map<std::string, std::string> orbit::http::MultipartUpload::fields

◆ files

std::vector<UploadedFile> orbit::http::MultipartUpload::files

Saved files. They belong to the application, which should move or delete them; discard() deletes them all.


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