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
{{ message }}
This repository was archived by the owner on Jan 20, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 20, 2025. It is now read-only.
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
@BlueAndi Sorry, don’t understand, could you explain please? How to create handler for some particular file type/extension? I tried regular expressions first, even considered they’re very heavy and consume a lot of precious resources on esp8266, but didn’t succeed since there’s a bug in the current gcc. How can i make different handlers now?
Thank you
Inherit your handler from AsyncWebHandler, like its done for the AsyncStaticWebHandler.
This way you could create it, as you shown in your initial post.
A different way would be to register a callback for "/xxx/yyy/*" via
Yes and no. If your handler (option 1 above) is generic enough on the interface, you implement it once, but instantiate it several times with different file extensions as parameter.
@BlueAndi so, why not simplify this and just add a few lines of code from my pr #751? It will provide a simple intuitive way to implement such a functionality
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
Activity
stale commentedon Jun 10, 2020
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
BbIKTOP commentedon Jun 11, 2020
Anyone alive here?
stale commentedon Jun 11, 2020
[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.
BlueAndi commentedon Jun 11, 2020
You could create your own handler and register it.
BbIKTOP commentedon Jun 11, 2020
@BlueAndi Sorry, don’t understand, could you explain please? How to create handler for some particular file type/extension? I tried regular expressions first, even considered they’re very heavy and consume a lot of precious resources on esp8266, but didn’t succeed since there’s a bug in the current gcc. How can i make different handlers now?
Thank you
BlueAndi commentedon Jun 11, 2020
You can add a handler via
ESPAsyncWebServer/src/ESPAsyncWebServer.h
Line 420 in f13685e
Inherit your handler from AsyncWebHandler, like its done for the AsyncStaticWebHandler.
This way you could create it, as you shown in your initial post.
A different way would be to register a callback for "/xxx/yyy/*" via
ESPAsyncWebServer/src/ESPAsyncWebServer.h
Line 423 in f13685e
In the callback you get access to the requested uri by request->url() and you can post-process it there.
The better option depends on how many different uri you will have.
BbIKTOP commentedon Jun 11, 2020
@BlueAndi but i need different handlers for different file types (i.e. file extensions)
Current url parameter does not support this, isn’t it?
BlueAndi commentedon Jun 11, 2020
Yes and no. If your handler (option 1 above) is generic enough on the interface, you implement it once, but instantiate it several times with different file extensions as parameter.
Yes, current url parameter doesn't support this.
BbIKTOP commentedon Jun 11, 2020
@BlueAndi so, why not simplify this and just add a few lines of code from my pr #751? It will provide a simple intuitive way to implement such a functionality
BlueAndi commentedon Jun 11, 2020
Not my decision, you have to wait for the maintainer. ;-)
BbIKTOP commentedon Jun 11, 2020
@BlueAndi Sure, but looks like nobody here for months...
me-no-dev commentedon Jun 11, 2020
he will show up when he has time :) preoccupied with a lot of work.
BbIKTOP commentedon Jun 11, 2020
@me-no-dev same here, mate, same here... waiting patiently, thank you!
BlueAndi commentedon Jun 11, 2020
@me-no-dev LOL
stale commentedon Aug 11, 2020
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
BbIKTOP commentedon Aug 11, 2020
Please, no “stale”, just add it ;)
stale commentedon Aug 11, 2020
[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.
stale commentedon Oct 10, 2020
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
BbIKTOP commentedon Oct 11, 2020
Please, merge it
stale commentedon Oct 11, 2020
[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.