diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2020-07-29 07:51:41 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2020-07-29 07:51:41 +0300 |
commit | 0ac3b187dff09b67bd4551e0124e6fad8884adda (patch) | |
tree | 5ef93190b12ec1e778ccc56f1b511c8ae3632739 /examples | |
parent | c5aa29ffc0a82864f5155427634a9ed7c40b3d06 (diff) | |
download | magi-0ac3b187dff09b67bd4551e0124e6fad8884adda.tar magi-0ac3b187dff09b67bd4551e0124e6fad8884adda.tar.xz magi-0ac3b187dff09b67bd4551e0124e6fad8884adda.zip |
Docs completed.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/upload.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/upload.c b/examples/upload.c index c9752b6..6349118 100644 --- a/examples/upload.c +++ b/examples/upload.c @@ -36,12 +36,13 @@ void response(struct magi_request *r) void get(struct magi_request *r) { - struct magi_loadfiles rules = { 0, 0 }; + struct magi_loadfiles *cb; + magi_loadfiles_init(&cb); /* Setup callback to load file from "data" field into file "data": */ - magi_loadfiles_add(&rules, "data", "data", 0); - magi_loadfiles_set(r, &rules); /* Setup request to use the callback. */ + magi_loadfiles_add(&cb, "data", "data", 0); + magi_loadfiles_set(r, &cb); /* Setup request to use the callback. */ magi_parse(r); - magi_loadfiles_free(&rules); /* Free data of callback. */ + magi_loadfiles_free(&cb); /* Free data of callback. */ } int main() |