Hi,
I'm trying to read a file from a google drive folder. The file is shared so anyone can view it and the link works.
I've been trying to follow the guides but I'm stuck. I have copied the code attached. program execution reaches the Wait For line, and then sub execution ceases and the code returns to the calling module.
The outputstream is not triggered, the file isn't saved.
Despite that, testing for File.Exists returns true, but the file can't be found in the destination folder.
any clues????
I'm trying to read a file from a google drive folder. The file is shared so anyone can view it and the link works.
I've been trying to follow the guides but I'm stuck. I have copied the code attached. program execution reaches the Wait For line, and then sub execution ceases and the code returns to the calling module.
called sub:
Sub DownloadAndSaveFile (Link As String)
Dim j As HttpJob
j.Initialize("", Me)
j.Download(Link)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log ("Success")
Dim out As OutputStream = File.OpenOutput(xui.DefaultFolder, CSVFile, False)
File.Copy2(j.GetInputStream, out)
out.Close '<------ very important
End If
j.Release
End Sub
The outputstream is not triggered, the file isn't saved.
Despite that, testing for File.Exists returns true, but the file can't be found in the destination folder.
any clues????