iOS Question Slow FTP Upload

nimsuk

Member
Licensed User
hi there

I'm having a slight problem trying to upload two files at the same time using ftp. The first file is able to upload quite quickly but the second file takes a long time to upload and is causing some problems server side. Any idea how we can speed things up?

This is the code I've used for the export
B4X:
Sub confirm_export_btn_Click
    
    lbl_heading1.Text = "Exporting Data - Audit Information"
    cancel_export_btn.Enabled = False
    confirm_export_btn.Enabled = False
    btn_select_pics.Enabled = False
    confirm_export_btn.Text = "Exporting..."
    
    
    Export_Uni = function.RandomNumberGen(15)
    

    
    
    
    dbname = Main.Corp_UserRef & ".db3"
    dbname_copy = Main.Corp_UserRef &"_"&Export_Uni&".db3"
    ver_filename = Main.Corp_UserRef  & "_" & Export_Uni & ".ver"
    

    FTP_Desination_Address = "//Outgoing//"

    
    File.WriteString(File.DirDocuments & "/" & Main.Corp_UserRef & "_db", ver_filename, Export_Uni)
    
    Main.FTP.Initialize("FTP",Main.FTP_IP, Main.FTP_Port, Main.FTP_Username, Main.FTP_Password)
    Main.FTP.PassiveMode = False
    
    
    Main.FTP.UploadFile(File.DirDocuments & "/" & Main.Corp_UserRef & "_db", dbname_copy, False, FTP_Desination_Address & dbname_copy)
    Main.FTP.UploadFile(File.DirDocuments & "/" & Main.Corp_UserRef & "_db", ver_filename, False, FTP_Desination_Address & ver_filename)
        
End sub
 
Top