Imported Upstream version 3.2.0
[platform/upstream/libwebsockets.git] / minimal-examples / http-server / minimal-http-server-form-post-file / README.md
1 # lws minimal http server form POST file
2
3 ## build
4
5 ```
6  $ cmake . && make
7 ```
8
9 ## usage
10
11 ```
12  $ ./lws-minimal-http-server-form-post-file
13 [2018/03/29 09:58:30:8800] USER: LWS minimal http server POST file | visit http://localhost:7681
14 [2018/03/29 09:58:30:8800] NOTICE: Creating Vhost 'default' port 7681, 1 protocols, IPv6 off
15 [2018/03/29 09:58:45:3284] USER: file_upload_cb: upload done, written 2729 to wss-over-h2.png
16 [2018/03/29 09:58:45:3284] USER: text1: (len 3) 'xxx'
17 [2018/03/29 09:58:45:3284] USER: send: (len 6) 'Submit'
18 ```
19
20 Visit http://localhost:7681, select a file to upload and submit the form.
21
22 The file is uploaded and saved in the cwd, the form parameters are dumped to the log and
23 you are redirected to a different page.