Closed jasoncoon closed 6 years ago
I used a fix from @hpwit here: https://github.com/hpwit/lib from this conversation: https://plus.google.com/+JasonCoon1/posts/UV9YQzXN6a4
Copy libspiffs.a
to the ESP32 tools directory:
\Documents\Arduino\hardware\espressif\esp32\tools\sdk\lib\libspiffs.a
And copy esp32fs.jar
to the Arduino tools directory:
\Documents\Arduino\tools\ESP32FS\tool\esp32fs.jar
Do you know if this fix ever made it upstream? Copying around a precompiled file from somewhere with no history, no indication of whether tip of tree is better/more recent and so forth, is not super inspiring :) @hpwit do you know by any chance?
Good question. I haven't tried the standard one included in the esp32 sdk in a while. I would hope it's been fixed.
Hmm, I wasn't able to get it to work - with or without the fix applied. My browser just seems to sit loading a white page. Maybe I have some strange network settings.
In Chrome console, I see GET http://192.168.1.203/ net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)
Then again, I wasn't able to find the appropriate folders mentioned for the first file in the fix. I ended up copying that to \AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.3\tools\sdk\lib
instead. I assume the difference is due to Windows :)
I've also tried both versions, fix and no fix, and get the same length mismatch error
I am not currently able to get the ESP32 web server to serve static files like I was able to with the ESP8266. The browser requests a file fine, and the response from the ESP32 web server has the correct headers, but the response body is empty.
It is able to connect to wifi, and basic HTTP requests work fine, just not serving static files from SPIFFS.
I have tried three different ESP32 web server libraries, with varying degrees of success:
I'm using this Arduino plugin to upload the sketch data directory containing the static files required for the web app:
Arduino ESP32 filesystem uploader
I am able to list the files stored in SPIFFS to the serial monitor:
Here's a request for
/index.htm
:And the response headers:
The response body is empty.
HTTP REST requests work fine.
Here's the REST request:
and the response:
index.har.zip