Tip: Use file.blob() instead of file.read()
A tip for those who are pulling their hair out reading the documentation and wondering why file.read() doesn't work.
file.blob() is what you need.
Please update the documentation with this simple change.
Thanks
Mark
2 Answers
-
var f = Titanium.Filesystem.getFile('categories.csv'); var read = f.blob();
Throws an Exception "function blob not found"
-
I think you missed a bit in your comment. Instead of:
var read = f.blob();
I have:
var read = f.read.blob;
and it works just fine. Thanks for pointing me in the right direction though.