Add mkdir to the FS API

This commit is contained in:
Sergey Lyubka committed 2022-01-18 19:19:34 +00:00
1 parent 56a7438114
commit d0857fe36c
8 files changed
+73 -54

No files matched your search

+2 -2
View File
@@ -10,10 +10,10 @@ static void cb(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
if (ev == MG_EV_HTTP_MSG) {
struct mg_http_message *hm = (struct mg_http_message *) ev_data;
if (mg_http_match_uri(hm, "/upload")) {
mg_http_upload(c, hm, "/tmp");
mg_http_upload(c, hm, &mg_fs_posix, "/tmp");
} else {
struct mg_http_serve_opts opts = {.root_dir = "web_root"};
mg_http_serve_dir(c, ev_data, &opts);
mg_http_serve_dir(c, hm, &opts);
}
}
}