ight i need some help on my Client - Server transfer code.
when i try to transfer any file from server to client i get the file with all bytes (same size as the original) but its currapted![]()
ive openned with a hex editor both files and many characters are different
heres some pics
Original File:
Downloaded File:
the code im using to transfer is this
Client:
Code:'-------------[ Transfer Client]------------- ElseIf Temp_Data = "FMT_Data" Then FileData = FileData & Clean_Data ElseIf Temp_Data = "FMT_Save" Then Save "C:\" & Clean_Data ElseIf Temp_Data = "FMT_Size" Then Fsize = Clean_Data End If Function Save(Fname As String) Open Fname For Binary As #1 Put #1, , FileData Close #1 FileData = Empty End Function
Server:
any help appreciatedCode:'-------------[ Transfer Server]------------- On Error Resume Next Dim Filename As String, DataChunk As String DataChunk = Empty Dim Fsys As New Scripting.FileSystemObject Filename = Fsys.GetFile(Fname).name Dim Size As Double Size = 0 Server.SendData "FMT_Size" & Fsys.GetFile(Fname).Size Pause 200 Open Fname For Binary As #1 Do While Not EOF(1) DataChunk = Input(5120, #1) Server.SendData "FMT_Data" & DataChunk Size = Size + Len(DataChunk) Pause 200 DoEvents Loop Close #1 Server.SendData "FMT_Save" & Filename
thanx


Reply With Quote