I have the download progress bar working in my program but I can't find any working code to determine the amount uploaded. here is my upload code
Code:Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork Dim clsRequest As System.Net.FtpWebRequest = _ DirectCast(System.Net.WebRequest.Create(FTPPath), System.Net.FtpWebRequest) clsRequest.Credentials = New System.Net.NetworkCredential("username", "password") clsRequest.Method = System.Net.WebRequestMethods.Ftp.UploadFile ' read in file... Dim bFile() As Byte = System.IO.File.ReadAllBytes(FileLocation) ' upload file... Dim clsStream As System.IO.Stream = _ clsRequest.GetRequestStream() clsStream.Write(bFile, 0, bFile.Length) clsStream.Close() clsStream.Dispose() MsgBox("File Is Now In Database", MsgBoxStyle.OkOnly, "Upload Complete") End Sub




Reply With Quote