Need a bit of help on server.on & handleUpload. #203
Replies: 2 comments 4 replies
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
Hi Mathieu, I have looked at the "Setup global and class functions as request handlers", which you are likely So I looked at the documentation, looked at at least 50+ more examples on the internet, tried even So, could you please point me into the right direction? Cheers, Henk |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I was having a rough time, moving my server.on handlers into a class. Finally I managed (still do not know for 100% what I'm exactly doing) and now I'm left with only one handler, for upload, and I can't get it to compile (not talking about working yet). So I really could use a bit of help to get into the testing and debug phase. I create an example that shows the issue (see attachment).
test11c.txt
The problem is with the line:
server.on("/Upload", HTTP_POST, [](AsyncWebServerRequest *request) {
request->send(200);
}, std::bind(&MyClass::handleUpload, this, std::placeholders::_1));
I'm having arguments too many (it says) but likely I'm missing some arguments or using a wrong type of argument (see attachment).
error.txt
I'm using:
So if someone with some better C++ Voodoo can please give me a hand ...
Cheers, Henk
Beta Was this translation helpful? Give feedback.
All reactions