-
• #2
Strange, I can read accellog.0.csv generated with accellog, but not setting.json
-
• #3
Replace 'gpspoilog.csv' with 'setting.json' because that file surely exists. But with the download button I get no data.
Ahh - this is your issue I think. There are two different types of file on Bangle.js:
- Normal files of a fixed length created with
require("Storage").write
- "StorageFile" files created with
require("Storage").open
which can be appended to
You're trying to load the first type (
setting.json
) using code meant for the second type (gpspoilog.csv
).Try using
Util.readStorage("setting.json")
instead and it'll probably be fine (the code normally usedUtil.readStorageFile
) - Normal files of a fixed length created with
-
• #4
Confirmed, that works, thank you. Would be nice to have this in the tutorial under http://www.espruino.com/Bangle.js+Storage
I tried to follow the tutorial here: http://www.espruino.com/Bangle.js+Storage but get no content for any file.
I'm trying to read a json file from the app loader, but I always get 0 bytes. Maybe someone has a clue what I'm doing wrong, steps to reproduce:
"interface": "interface.html"
to metadata.json
1 Attachment