-
• #2
here's how the file looked after I uploaded it.
1 Attachment
-
• #3
The issue is that
xyz (StorageFile)
isn't actually the filename, it's just a note to say it's a different kind of file - see http://www.espruino.com/Reference#StorageFileI think right now there's actually no way to upload a file as a StorageFile using the IDE. About all you could do is upload to a normal file, and then use some code on Espruino to copy the standard File to a StorageFile.
I'm not 100% sure but this may be all you need:
s = require("Storage"); s.open(".gpsrc3", "w").write(s.read("myuploadedfile"));
If the plan is to just be able to export the GPS data though then @Serj actually make an exporter that works outside of Bangle.js: http://forum.espruino.com/conversations/360747/#15864867
-
• #4
I am wondering what is the purpose / benefit of having these files have (Storage File) appended on the end of the filename
There are two ways/APIs how to write to storage - Storage.write/read see https://www.espruino.com/Reference#Storage or StorageFile https://www.espruino.com/Reference#StorageFile So it is a marker to know which type it is. I guess removing it from name would break it in a way that it will be written in a 'wrong' way via the Storage.write and then won't be found by code expecting to open it via Storage.open
EDIT: oh gordon already explained it so ignore this
-
• #5
thanks both.
I mistakenly logged 2 walks in the same GPS log file. So I downloaded the file and split them. However when I upload the file I end up with quotes round the filename. How could I upload these files ? Also I am wondering what is the purpose / benefit of having these files have (Storage File) appended on the end of the filename ?
1 Attachment