int wret = esp_http_client_write(client, buffer, length); if(wret < 0) { esp_http_client_close(client); SD_close(file); return false; } fileProgress += wret; //ESP_LOGI(TAG, "%.*s", length, buffer); time_t now; time(&now); if((float)(now - fileTransferStart) / 1024 ...