Response code for void onUploadFile() to tell Chrome to stop trying to upload
Posted: Sat Aug 15, 2020 1:18 am
In Arduino I am using the typical
void onUploadFile(AsyncWebServerRequest * request, String filename, size_t index, uint8_t *data, size_t len, bool final) {
} function, it returns at the end on successful completion
AsyncWebServerResponse *response = request->beginResponse(200, "text/plain", responseString);
response->addHeader("Connection", "close");
request->send(response);
but what does it send to stop the browser uploading when there is an error like you run out of SPIFFS space...??
I have tried various codes and none do the trick.
RichardS
void onUploadFile(AsyncWebServerRequest * request, String filename, size_t index, uint8_t *data, size_t len, bool final) {
} function, it returns at the end on successful completion
AsyncWebServerResponse *response = request->beginResponse(200, "text/plain", responseString);
response->addHeader("Connection", "close");
request->send(response);
but what does it send to stop the browser uploading when there is an error like you run out of SPIFFS space...??
I have tried various codes and none do the trick.
RichardS