Mongoose always buffers a full HTTP message before invoking
MG_EV_HTTP_MSG event. Big POST request require of lot
of RAM to buffer everything. Therefore, standard form uploads
should be used only when Mongoose runs on a system with lots of RAM.
Otherwise, please see file-updload
example, how
a big file could be uploaded to a device with little RAM.
In this example, a standard HTML form upload is used, which uses
multipart-form-data
encoding with
several variables and file upload. On a server side, a
mg_http_next_multipart()
API is used to iterate over
all submitted form elements and print their payload.