HttpMultipartResource Class Reference
HttpResource that allows handling of HTTP file upload. More...
#include <HttpMultipartResource.h>
Inheritance diagram for HttpMultipartResource:
Collaboration diagram for HttpMultipartResource:
Public Member Functions | |
| HttpMultipartResource (const HttpFilesMapper &mapper, HttpResourceDelegate complete) | |
| Create and configure a HttpResource for handling file upload. More... | |
| virtual int | setFileMap (HttpServerConnection &connection, HttpRequest &request, HttpResponse &response) |
| Callback implementation for HttpResource::onHeadersComplete. Not to be used by application code. More... | |
| void | shutdown (HttpServerConnection &) override |
| Takes care to cleanup the connection. More... | |
Public Member Functions inherited from HttpResource | |
| virtual | ~HttpResource ()=default |
| void | addPlugin (HttpResourcePlugin *plugin) |
| template<class... Tail> | |
| void | addPlugin (HttpResourcePlugin *plugin, Tail... plugins) |
Additional Inherited Members | |
Public Attributes inherited from HttpResource | |
| HttpResourceDelegate | onUrlComplete = nullptr |
| URL is ready. Path and status code are available. More... | |
| HttpServerConnectionBodyDelegate | onBody = nullptr |
| resource wants to process the raw body data More... | |
| HttpResourceDelegate | onHeadersComplete = nullptr |
| headers are ready More... | |
| HttpResourceDelegate | onRequestComplete = nullptr |
| request is complete OR upgraded More... | |
| HttpServerConnectionUpgradeDelegate | onUpgrade = nullptr |
| request is upgraded and raw data is passed to it More... | |
Detailed Description
HttpResource that allows handling of HTTP file upload.
Constructor & Destructor Documentation
◆ HttpMultipartResource()
|
inline |
Create and configure a HttpResource for handling file upload.
On a normal computer the file uploads are usually using temporary space on the hard disk or in memory to store the incoming data. On an embedded device that is a luxury that we can hardly afford. Therefore we should define a map that specifies explicitly where every form field will be stored. If a field is not specified then its content will be discarded.
- Parameters
-
mapper callback that provides information where the desired upload fields will be stored. complete callback that will be called after the request has completed.
Member Function Documentation
◆ setFileMap()
|
virtual |
Callback implementation for HttpResource::onHeadersComplete. Not to be used by application code.
◆ shutdown()
|
inlineoverridevirtual |
Takes care to cleanup the connection.
Reimplemented from HttpResource.
The documentation for this class was generated from the following file:
Public Member Functions inherited from
1.9.1