Italian download _link file csv da drive Aruba

diresc

Member
Licensed User
Longtime User
B4X:
Dim j As HttpJob
    j.Initialize("", Me)
    

    j.Download("https://www.xxxxx.it/s/id_file/download/file.csv") 'drive Aruba
    
    Wait For (j) JobDone(j As HttpJob)
    If j.Success = True Then
        Dim out As OutputStream
        Dim in As InputStream
        
        
        in = j.GetInputStream
        out = File.OpenOutput(File.DirInternal , "file.csv", False)
        
        Wait For (File.Copy2Async(in, out)) Complete (Success As Boolean)
        Log("Success: " & Success)
        
        in.close
        out.Close
        
    Else
        Log("Fallito")
    End If
    j.Release
 

Sagenut

Expert
Licensed User
Longtime User
Prova
B4X:
Dim j As HttpJob
    j.Initialize("", Me)
    

    j.Download("https://www.xxxxx.it/s/id_file/download/file.csv") 'drive Aruba
    j.GetRequest.SetHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36")
    
    Wait For (j) JobDone(j As HttpJob)
    If j.Success = True Then
        Dim out As OutputStream
        Dim in As InputStream
        
        
        in = j.GetInputStream
        out = File.OpenOutput(File.DirInternal , "file.csv", False)
        
        Wait For (File.Copy2Async(in, out)) Complete (Success As Boolean)
        Log("Success: " & Success)
        
        in.close
        out.Close
        
    Else
        Log("Fallito")
    End If
    j.Release
 

diresc

Member
Licensed User
Longtime User
Scusate non ho scritto il problema :se uso il link del file con chrome lo scarica se lo inserisco nel codice errore 403
 

diresc

Member
Licensed User
Longtime User
Grazie funziona alla grande
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…