I have made 'tons' of research and, although I made several apps that use web services to retrieve data from a web server, i'm unable to copy a simple text file from web server to my app, maybe in DirInternal folder.
I am becoming stupid?!?
This is what i tried to do
S
This (is the best i found in my research) don't work for an error in file.Copy2 (array expected)
My brain is 'down'.
Can anyone help me to solve this (i think very simple) problem.
(I also would like to copy 10 single file one by one)
Thank you
Sergio
I am becoming stupid?!?
This is what i tried to do
S
B4X:
Sub Globals
Private MyButton As Button
Private link1 As String
Dim job1 As HttpJob
End Sub
B4X:
Sub MyButton _Click
Dim fileurl As String
fileurl ="http://myserver/abc.txt"
job1.Initialize("Job1",Me)
job1.Download(fileurl)
If job1.Success=True Then
File.Copy2(job1.GetInputStream(fileurl), File.OpenOutput(File.Dirinternal,"downloaded.txt",False))
End If
End Sub
This (is the best i found in my research) don't work for an error in file.Copy2 (array expected)
My brain is 'down'.
Can anyone help me to solve this (i think very simple) problem.
(I also would like to copy 10 single file one by one)
Thank you
Sergio