Host: some url
Content-Type: multipart/form-data
Accept: */*
Content-Disposition: form-data; name="file"; filename="timestamp.jpg"
I am doing this
Code: Select all
file = SPIFFS.open("/timestamp.jpg");
String debugLogData;
while (file.available()) {
debugLogData += char(file.read());
}
file.close();
Serial.println("=====================================");
Serial.println(debugLogData);
Serial.println("=====================================");
HTTPClient http;
http.begin("https://id=some url");
http.addHeader("Content-Disposition", "form-data; name=\"file\"; filename=\"timestamp.jpg\"");
http.addHeader("Content-Type", "multipart/form-data");
http.addHeader("Accept", "*/*");
int httpResponseCode = http.POST(debugLogData);
http.end();
Regards,