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
Thank you for the report and the proposed fix. Your change makes sense. I want to check it on ESP8266, just to be safe, before applying change (my guess is that ESP8266 may works without the change, which may be why we didn't catch this sooner).
Yes, this works correctly unchanged on ESP8266. This example was written originally on ESP8266. And, conveniently the ESP8266 uses "/" for config.file.root. Just concatenating them gives a double slash. The http path has a leading slash. So, for this to work everywhere (ESP8266, ESP32, Pico, macOS, etc) the path should be calculated as follows:
constpath=config.file.root+value.slice(1);
And.... in testing, I found the curl line is incorrect. Here's a better line:
Build environment: Linux
Moddable SDK version: 4.2.0
Target device: ESP32-S3
Description
When uploading a file via curl the example program halts at line 24 with a file not found error.
this.file = new File(path, true);
Steps to Reproduce
mcconfig -d -m -p eps32/esp32s3
curl --data-binary "text file contents" http://192.168.1.199/test.txt -v
Expected behavior
The file to be uploaded to the device
Resolution
Including
mc/config
and prefixing the path withconfig.file.root
fixes the problem.The text was updated successfully, but these errors were encountered: