MCPcopy Create free account
hub / github.com/bmorcelli/Launcher / updateFromSdHandler

Function updateFromSdHandler

src/webInterface.cpp:514–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512}
513
514esp_err_t updateFromSdHandler(httpd_req_t *req) {
515 if (!checkUserWebAuth(req)) return ESP_OK;
516 WebParamMap params = readParams(req);
517 if (params.has("fileName")) {
518 fileToCopy = params.get("fileName");
519 sendText(req, "text/plain", "Starting Update");
520 updateFromSd_var = true;
521 } else {
522 sendText(req, 400, "text/plain", "Missing fileName");
523 }
524 return ESP_OK;
525}
526
527esp_err_t renameHandler(httpd_req_t *req) {
528 if (!checkUserWebAuth(req)) return ESP_OK;

Callers

nothing calls this directly

Calls 5

checkUserWebAuthFunction · 0.85
readParamsFunction · 0.85
sendTextFunction · 0.85
hasMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected