1
0
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:
bel
2016-02-14 23:25:24 +01:00
parent aa7cbc21bc
commit d224b8291d

View File

@@ -8967,9 +8967,12 @@ mg_upload(struct mg_connection *conn, const char *destination_dir)
struct mg_form_data_handler fdh = {mg_upload_field_found,
NULL,
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) {
mg_cry(conn, "%s: Error while parsing the request", __func__);
}