|
-
Apr 20th, 2007, 08:55 AM
#1
Thread Starter
Hyperactive Member
[Resolved] FTP using Winsock
I am making a simple FTP file uploader/downloader using winsock (only thing left to put in is error handling) and i've just noticed that when i upload a file (in this case it was an access db) and download it, the file grows (from 983,042 to 984,066 bytes) why might this be? i have attached the project, it consists of my winsockftp class and an interface form.
Last edited by Arachnid13; Apr 20th, 2007 at 09:54 AM.
Reason: Resolved, and removing attachment
Do you wake up in the morning feeling sleepy and grumpy? Then you must be Snow White
-
Apr 20th, 2007, 09:22 AM
#2
Thread Starter
Hyperactive Member
Re: FTP using Winsock
Found out where the problem is... but i dont really know what to do about it. By testing uploads and downloads i found the following using the Open.. for Output method to save the downloaded data:
original 984064
download 984066 (+2)
upload 985088 (+1022)
download 985090 (+2)
upload 986112 (+1022)
the gaining two bytes each download made me think that the file print method was adding a vbCrLf to the file when i saved it so i switched to using binary and the put method and this resulted in the following filesizes:
original 984064
download 984064 (+0)
upload 985088 (+1024)
download 985088 (+0)
upload 986112 (+1024)
so i think this is something to do with the fact i'm reading 1024 bytes at a time from the local file before uploading it... but i dont know where to go from here. any help
Do you wake up in the morning feeling sleepy and grumpy? Then you must be Snow White
-
Apr 20th, 2007, 09:54 AM
#3
Thread Starter
Hyperactive Member
Re: FTP using Winsock
fixed it
if anyone's interested in seeing the solution then drop me a pm
Do you wake up in the morning feeling sleepy and grumpy? Then you must be Snow White
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|