mirror of
https://github.com/lammertb/libhttp.git
synced 2025-12-22 04:02:04 +03:00
Alternative to mg_upload (Step 53/?)
This commit is contained in:
@@ -8967,9 +8967,12 @@ mg_upload(struct mg_connection *conn, const char *destination_dir)
|
|||||||
struct mg_form_data_handler fdh = {mg_upload_field_found,
|
struct mg_form_data_handler fdh = {mg_upload_field_found,
|
||||||
NULL,
|
NULL,
|
||||||
mg_upload_field_stored,
|
mg_upload_field_stored,
|
||||||
&fud};
|
0};
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
fdh.user_data = (void *)&fud;
|
||||||
|
ret = mg_handle_form_request(conn, &fdh);
|
||||||
|
|
||||||
int ret = mg_handle_form_request(conn, &fdh);
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
mg_cry(conn, "%s: Error while parsing the request", __func__);
|
mg_cry(conn, "%s: Error while parsing the request", __func__);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user