Android Question Download always emty with GetInputStream

schimanski

Well-Known Member
Licensed User
I want to dowload different files from my fileserver. It work very well, but when I try to save the file with GetInputStream, the files are always emty???

B4X:
Sub JobDone(j As HttpJob)
   If j.Success Then
     If j.JobName="download" Then
       Dim out As OutputStream
       out.InitializeToBytesArray(100)
       File.OpenOutput(File.DirRootExternal, "test.db", False)
       File.Copy2(j.GetInputStream, out)
       out.Close
       ToastMessageShow("Download abgeschlossen:", False)  
     end if
    else
      .....
Thanks for help...
 
Top