anotherjoe wrote:I use a flavour of the FSBrowser code sample embedded within my project code and I have to say that what you've described sounds familiar. For the most part it does work fine for me but on occasion I do see an issue where a html file is uploaded, is stored in SPIFFS and it somehow gets corrupted in the process. The problem manifests itself in the way you describe where when that file is later served by the webserver and it looks like it contains garbled / missing / corrupted content resulting in broken render and broken JS in the browser.
When it happens, I immediately attempt to upload the file again via the FSBrowser and more often than not it sorts itself out on the second attempt. For some reason sometimes it takes 3 or 4 goes to get the file stored successfully. On just a couple of occasions over a 6 month period, SPIFFS flash has appeared to get completely corrupted and I've had to perform a SPIFFS format and re-upload the files over serial to straighten things out.
I've not got to the bottom of why this happens and my project code and device is generally well behaved and rock solid stable at runtime with plenty of free heap memory available. So this problem is more an annoyance than a showstopper here.
I'm not sure how applicable this is though because like I said I've checked the code once it's on the server (through the /edit page) and it looks fine?