tve wrote:Nice, I am looking forward for the code! It comes down to two very different use-cases: pushing new FW in development mode vs. pull updates in "production" mode.
Attaching my modified "cgiflash.c", this is nowhere near as elegant as the patch files you provide, sorry about this. The new code is mostly work by Andrei Tatar. Everything is pretty much hardcoded now, I am working to fully automate FW version checking and auto-updating, this is pretty straight forward to achieve.
I also fiddled a bit with the urls so that they make a more sense (at least to me)
HttpdBuiltInUrl builtInUrls[]={
{"/", cgiRedirect, "/index.tpl"},
{"/flash/read", cgiReadFlash, NULL},
{"/flash/next", cgiGetFirmwareNext, NULL},
{"/flash/upload", cgiUploadFirmware, NULL},
{"/flash/reboot", cgiRebootFirmware, NULL},
{"/flash/download", cgiDownloadFirmware, NULL},
{"/led.tpl", cgiEspFsTemplate, tplLed},
{"/index.tpl", cgiEspFsTemplate, tplCounter},
{"/led.cgi", cgiLed, NULL},