Help with FtpWebRequest (UploadFile status/progress)
I have implemented a code to send file to our server using FTP, and it is
But the issue is I have no idea when the process will complete sending.
Is there any way to know how much has been sent to the server or any event I
can trap when the process ends.
Below is the sample code I am using.
Dim reqObj As FtpWebRequest =
reqObj.Credentials = New NetworkCredential("something", "something")
reqObj.Method = WebRequestMethods.Ftp.UploadFile
Dim streamObj As IO.FileStream = System.IO.File.OpenRead(FileName)
Dim buffer(streamObj.Length) As Byte
streamObj.Read(buffer, 0, buffer.Length)
streamObj = Nothing
reqObj.Proxy = Nothing
reqObj.GetRequestStream().Write(buffer, 0, buffer.Length)
reqObj = Nothing
Please guide with an example or link.
Thanks in advance.
|All times are GMT. The time now is 04:23 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.