DETAILS: My code is rather multi-threaded (all be it... co-operative multi-threaded) and its set up to return control to the Sketch.loop() and the next time through, if there is an available file spot, it can then open and process the file.
As work arounds, I could:
(1) Make a file counter and not let it get to 6. But then if I replace SPIFFS with something else, I'm having to revisit this web-server code.
(2) Write some code to make sure the end-users don't load some zero length files.
Both seem rather a kludge - Any suggestions?
w/ GUI Admin Client, Drag & Drop File Manager, OTA Built-In, Access Point Manager,
Performance Metrics, Web Socket Comms, App API, All running on ESP8266...
Even usable on ESP-01S --- Please check it out!
https://inqonthat.com/inqportal-the-three-line-promise/
https://InqOnThat.com/inqportal