In order to be able to edit larger files, I read the input file from SPIFFS in blocks of 1k and send each block in turn to the client using successive calls to ESP8266WebServer.setContentLength(...), ESP8266WebServer.send(...) and ESP8266WebServer.client().write(...). This works well.
When I wish to send the edited text back to the server, I submit the html form and use a statement like
String editor=ESP8266WebServer.arg("editor");to read the data on the Server. I can then easily save the data to SPIFFS. This approach POSTs the edited data back to the Server in one go which has significant memory implications for larger file sizes. In order to be able to handle any file size, I need to be able to POST the edited data back to the Server in blocks of 1k in a similar way to that used to send the input data to the Server in the first place.
I do not know how to do this - can anybody please give me some pointers...???
Thanks
n