Commit e0beac8
File tree
1 file changed
+2
-2
lines changed- libraries/Update/examples/AWS_S3_OTA_Update
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
@@ -26,7 +26,7 @@ WiFiClient client;
26
26
27
27
// Variables to validate
28
28
// response from S3
29
-int contentLength = 0;
29
+long contentLength = 0;
30
30
bool isValidContentType = false;
31
31
32
32
// Your SSID and PSWD that the chip needs
@@ -120,7 +120,7 @@ void execOTA() {
120
120
// extract headers here
121
121
// Start with content length
122
122
if (line.startsWith("Content-Length: ")) {
123
- contentLength = atoi((getHeaderValue(line, "Content-Length: ")).c_str());
123
+ contentLength = atol((getHeaderValue(line, "Content-Length: ")).c_str());
124
124
Serial.println("Got " + String(contentLength) + " bytes from server");
125
125
}
126
126
0 commit comments