1 year ago
#242401
user1504343
stm32h743 webserver how download text file from browser
I have set up an STM32H743 nucleo webserver which works OK by presenting a small webpage on a browser (I am using LWIP+CubeIDE).
I can give the webserver simple commands via CGI (see below) and thereby print something to the serial port. Unfortunately, I cannot seem to find a way download a file from the browser to the webserver and onwards to the serial port of the STM32. I don't need to store this data, just pass it through to the port. I am not an expert as you can see, but could someone point me into the right direction as regards the simplest way to do this? I don't really want to add any more hardware.
const char * valueCGIhandler(int iIndex, int iNumParams, char *pcParam[], char *pcValue[])
{
uint32_t i=0;
if (iIndex == 0)
{
if( strstr((*pcParam),"SETPOINT"))
{
Println(&huart3,*pcValue);
}
}
return "/index.shtml";
}
javascript
webserver
cgi
ssi
stm32h7
0 Answers
Your Answer