-
Nice, it's working.
Some issue with non-ascii characters:
If the file contains non-ascii characters, the preview doesn't work (see the attached image). But download does work. My test file's contains:
helló halló
Or even the upload fails on some characters:
Uncaught DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.
For example the attached
almaá.txt
. Theá
character causes the upload to fail. That's a totally normalá
, nothing unicode weirdness.
And there is no feedback on the ui. If btoa doesn't work I don't know if you can do anything. But a try-catch & some error message would be nice :)
2 Attachments
Hi!
Just to let you know I've been adding a menu to allow you to list files in Espruino's storage, view, download and upload them.
Should work with Bluetooth and Serial.
You can try it out on the GitHub-hosted Web IDE (it's not live on the proper one yet):
https://espruino.github.io/EspruinoWebIDE/
Just click the star in the bottom-middle of the window. If you don't get one, try a hard-reload, and if you've used the GitHub IDE before and it's not working now, try going into
chrome devtools -> application -> unregister service worker
and try another hard reload.I'd be interested to see what you think. Hopefully image converter tools will come soon.