Hi there Interesting.... The GetFileAsDataURL and other GetFile methods return a BANanoPromise and it has a BANanoFetchOptions variable passed to it. Am I right to assume that its possible for it to have a return type of BANanoFetch? This will enable one to execute something like Dim bf...
www.b4x.com
B4X:
Dim blob As BANanoObject = BANano.Await(BANano.GetFileAsText("./assets/myfile.txt", Null, "UTF-8"))
Dim MyText As String = blob.ToString
BANano.Console.Log(MyText)
'...'
Why are you using a blob in this case? GetFileAsText already returns the string. The example above using blob is because the OP wanted the 'file' (not the contents) so he could get its size, last modification etc.
B4X:
Dim myText as String = BANano.Await(BANano.GetFileAsText("./assets/myfile.txt", Null, "UTF-8"))
log(myText)
Why are you using a blob in this case? GetFileAsText already returns the string. The example above using blob is because the OP wanted the 'file' (not the contents) so he could get its size, last modification etc.
B4X:
Dim myText as String = BANano.Await(BANano.GetFileAsText("./assets/myfile.txt", Null, "UTF-8"))
log(myText)