![]() |
Click here to advertise with us
|
|
|||||||
| Net / Sockets Components for network and related use |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
k, looping through the file and writing peices via upload ftp... it leaves out some random parts of the txt file.. like 1 or 2 characters.. was leaving off more so I changed my divider to a double from integet and that corrected it a lot. I guess I need to be counting the actual bytes and dividing by that?
here is code help pbUpload.Visible = True Dim intFbytes As Double Dim intOffset As Double Dim clsStream As System.IO.Stream = clsRequest.GetRequestStream() intFbytes = bFile.Length / 100 pbUpload.Maximum = 100 For I As Integer = 0 To 100 If intOffset + intFbytes > bFile.Length Then intFbytes = bFile.Length - intOffset clsStream.Write(bFile, intOffset, intFbytes) intOffset += intFbytes pbUpload.Value = I Next clsStream.Close() clsStream.Dispose() pbUpload.Visible = False |
|
|||
|
resolved. fixed code..
pbUpload.Visible = True Dim intFbytes As Integer Dim intOffset As Integer Dim clsStream As System.IO.Stream = clsRequest.GetRequestStream() intFbytes = bFile.Length / 100 intFbytes = intFbytes + 1 pbUpload.Maximum = 100 For I As Integer = 0 To 100 If intOffset + intFbytes > bFile.Length Then intFbytes = bFile.Length - intOffset clsStream.Write(bFile, intOffset, intFbytes) intOffset += intFbytes pbUpload.Value = I Next clsStream.Close() clsStream.Dispose() pbUpload.Visible = False |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|