read file txt to my NAS

alan1968

Active Member
Licensed User
Longtime User
hello,
I start with B4A, I would like to read a txt file "test.txt" on my nas (192.168.2.10/public/test.txt) and view its content on the screen, how do I take

thx !
 

alan1968

Active Member
Licensed User
Longtime User
I can display a file on a web server "http://192.168.2.10/index.html" but not on my file server "file://192.168.2.10/public/texte.txt"

Error. Url = file: / / Message = 192.168.2.10/public/texte.txt java.lang.IllegalStateException: Scheme 'file' not registered.

Sub Globals
Dim myfiles As String
myfiles="file://192.168.2.102/isa/texte.txt"
End Sub

Sub Activity_Create (FirstTime As Boolean)
HttpUtils.CallbackActivity = "Main"
HttpUtils.CallbackJobDoneSub = "JobDone"
HttpUtils.Download("Job1", myfiles)
End Sub

Sub JobDone (Job As String)
Dim in_myfiles As String
If HttpUtils.IsSuccess(myfiles) Then
in_myfiles = HttpUtils.GetString(myfiles)
Msgbox(in_myfiles ,"test")
Else
Msgbox("error" ,"test")
End If
End Sub


thx!
Erel
 
Last edited:
Upvote 0

rtesluk

Member
Licensed User
Longtime User
NAS = Network Attached Storage

I have a NAS and I have mapped it to a lettered drive ('Y:') on my computer running XP Pro.

My model is a Synology Disk Station DS410J 4-BAY NAS Unit.

Ray :sign0060:
 
Upvote 0
Top