[GH-ISSUE #503] Serving pages from the filesystem #422

Open
opened 2026-02-28 01:25:13 +03:00 by kerem · 10 comments
Owner

Originally created by @renegadeandy on GitHub (Feb 5, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/503

Can somebody offer an example sketch which serves the in memory pages, from the filesystem instead of the ones in memory?

I have read and tried changing the server to a SPIFFS server(https://github.com/r-downing/SPIFFSReadServer) rather than a ESP8266WebServer, but the result is never stable. Please offer an example of how this can be done.

Using v2 prebuilt, 80mhz, esp-12-e, all through Arduino IDE

Originally created by @renegadeandy on GitHub (Feb 5, 2018). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/503 Can somebody offer an example sketch which serves the in memory pages, from the filesystem instead of the ones in memory? I have read and tried changing the server to a SPIFFS server(https://github.com/r-downing/SPIFFSReadServer) rather than a ESP8266WebServer, but the result is never stable. Please offer an example of how this can be done. Using v2 prebuilt, 80mhz, esp-12-e, all through Arduino IDE
Author
Owner

@renegadeandy commented on GitHub (Feb 8, 2018):

Help? Is there a community around this library?

<!-- gh-comment-id:364278737 --> @renegadeandy commented on GitHub (Feb 8, 2018): Help? Is there a community around this library?
Author
Owner

@tablatronix commented on GitHub (Feb 9, 2018):

Nobody is gonna dl a zip to see your code

<!-- gh-comment-id:364292250 --> @tablatronix commented on GitHub (Feb 9, 2018): Nobody is gonna dl a zip to see your code
Author
Owner

@renegadeandy commented on GitHub (Feb 9, 2018):

The code can be found here: https://bitbucket.org/renegadeandy/wifimanagerbug/

Assuming you had a data/otherpage.html, data/css/style.css, data/js/other.js, it should be served up.

But it rarely works and makes a real meal of serving the pages.

<!-- gh-comment-id:364498208 --> @renegadeandy commented on GitHub (Feb 9, 2018): The code can be found here: https://bitbucket.org/renegadeandy/wifimanagerbug/ Assuming you had a data/otherpage.html, data/css/style.css, data/js/other.js, it should be served up. But it rarely works and makes a real meal of serving the pages.
Author
Owner

@tablatronix commented on GitHub (Feb 9, 2018):

maybe remove the wifimanager handlenotfound event ?

<!-- gh-comment-id:364530029 --> @tablatronix commented on GitHub (Feb 9, 2018): maybe remove the wifimanager handlenotfound event ?
Author
Owner

@tablatronix commented on GitHub (Feb 9, 2018):

oh nm you did

<!-- gh-comment-id:364530205 --> @tablatronix commented on GitHub (Feb 9, 2018): oh nm you did
Author
Owner

@renegadeandy commented on GitHub (Feb 9, 2018):

yep . :)

It's not that.

<!-- gh-comment-id:364536028 --> @renegadeandy commented on GitHub (Feb 9, 2018): yep . :) It's not that.
Author
Owner

@renegadeandy commented on GitHub (Feb 11, 2018):

Bump.

<!-- gh-comment-id:364771135 --> @renegadeandy commented on GitHub (Feb 11, 2018): Bump.
Author
Owner

@morrisho commented on GitHub (May 29, 2020):

Hi there, I figured something out finally. I am able to use SPIFFS to load .html and .css files. I successfully did the root page and I am working on other pages too. However, I actually uses khoih's version for my mod. But the method is the same. This is the first time I contribute something on github so I am not sure how this works. Should I put my mod on a forked version or how does people normally do?

<!-- gh-comment-id:635941629 --> @morrisho commented on GitHub (May 29, 2020): Hi there, I figured something out finally. I am able to use SPIFFS to load .html and .css files. I successfully did the root page and I am working on other pages too. However, I actually uses [khoih's](https://github.com/khoih-prog/ESP_WiFiManager) version for my mod. But the method is the same. This is the first time I contribute something on github so I am not sure how this works. Should I put my mod on a forked version or how does people normally do?
Author
Owner

@tablatronix commented on GitHub (May 29, 2020):

fork, new branch with name of change

<!-- gh-comment-id:636023317 --> @tablatronix commented on GitHub (May 29, 2020): fork, new branch with name of change
Author
Owner

@morrisho commented on GitHub (May 30, 2020):

Hello, I put my mod here. I don't know much about html or css so I did my best I can moving the HTTP array stuff to html files. I am not sure how to do dynamic html content update so I basically dump the file text into string and replace {variables} with updated information. This is the reason the html file cannot have \n character otherwise the replace function won't work. I googled around found that it seems AJAX can be used for this?

<!-- gh-comment-id:636316494 --> @morrisho commented on GitHub (May 30, 2020): Hello, I put my mod [here](https://github.com/morrisho/WiFiManager_HtmlFile). I don't know much about html or css so I did my best I can moving the HTTP array stuff to html files. I am not sure how to do dynamic html content update so I basically dump the file text into string and replace {variables} with updated information. This is the reason the html file cannot have \n character otherwise the replace function won't work. I googled around found that it seems AJAX can be used for this?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#422
No description provided.