Response code for void onUploadFile() to tell Chrome to stop trying to upload

themindfactory
Posts: 58
Joined: Mon Mar 26, 2018 7:57 pm

Response code for void onUploadFile() to tell Chrome to stop trying to upload

Postby themindfactory » 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

Who is online

Users browsing this forum: No registered users and 83 guests