When you start the web server, the bottom of the page has some hint for you to create your own web server.
In your project directory, there are a few interesting files
- ReadMe.txt
- ro_zipfs.zip
- web_server.c/.h
- http.c/.h
- and all other *.c /*.h
(1) ReadMe.txt
Read the "ReadMe.txt" first, it has some text about this web_server project & little explain on each important c & h file.
(2) ro_zipfs.zip
It is just a zip file, without compression, consist of index.html, and several html pages and pictures. Modify it to suite your web page need, and zip it without compression.
(3) web_server.c
web_server.c is where the main() define
(4) http.c
http.c define the mapping from the web page HTML "POST" request to the actual function call in http.c
Look at
- "post_funcs" that define the mapping struct at http.c line 110,
- "sweep_field" declaration that map HTML POST "/SWEEP" at http.c line 336
- and index.html method=post action="/SWEEP" declaration
-
The function that you need will be very similar to the "choose" & "upload" button and the program_flash.html in the zip file.