You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In setup: server.on ("/upload", HTTP_POST, handleUpload, handkeData);
In code (see comments in the text below):
void (AsyncWebServerRequest * request) {
request->redirect (200, "plain/text", "OK");
}
void handleData (AsyncWebServerRequest * request, String fileName, size_t index, uint8_t * data, size_t len, bool final) {
if (!index)
request->_tempFile = LittleFS.open (fileName); // what to do if this fails (file name too long, ...) ???
if (len)
request->_tempFile.write (data, len); // what to do if we run out of space ???
if (final)
request->_tempFile.close ();
}
I confirm that:
I have read the documentation.
I have searched for similar discussions.
I have searched for similar issues.
I have looked at the examples.
I have upgraded to the lasted version of ESPAsyncWebServer (and AsyncTCP for ESP32).
This discussion was converted from issue #248 on July 29, 2025 17:50.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Platform
ESP32
IDE / Tooling
Arduino (IDE/CLI)
What happened?
How to handle errors in this process like:
How to abort the upload process ?
Stack Trace
Documentation issue
Minimal Reproductible Example (MRE)
In setup:
server.on ("/upload", HTTP_POST, handleUpload, handkeData);
In code (see comments in the text below):
I confirm that:
Beta Was this translation helpful? Give feedback.
All reactions