200 int DownloadSpiffs(char *filename) |
200 int DownloadSpiffs(char *filename) |
201 { |
201 { |
202 esp_err_t err; |
202 esp_err_t err; |
203 static char theurl[73], thefile[41]; |
203 static char theurl[73], thefile[41]; |
204 FILE *f; |
204 FILE *f; |
205 |
|
206 // static char todel[41]; |
|
207 // snprintf(todel, 40, "/spiffs//%s", filename); |
|
208 // unlink(todel); |
|
209 // return 0; |
|
210 |
205 |
211 snprintf(theurl, 72, "http://update.mbse.eu/ap1/image/%s", filename); |
206 snprintf(theurl, 72, "http://update.mbse.eu/ap1/image/%s", filename); |
212 snprintf(thefile, 40, "/spiffs/%s", filename); |
207 snprintf(thefile, 40, "/spiffs/%s", filename); |
213 |
208 |
214 esp_http_client_config_t update = { |
209 esp_http_client_config_t update = { |