[Tutor] FTP: can't move a large file!

Bill Tolbert bill_tolbert@bigfoot.com
Fri, 27 Jul 2001 19:51:30 -0400 (EDT)


I'm having trouble getting the ftplib to move a 20meg file. It works fine
for small files, but it moves only a small chunk of the large file then
quits!

Here is a code sample:

import ftplib
datafile = open("e:\\temp\\bigfile")

f = ftplib.FTP() 
f.connect("myserver.org") 
f.login("me","mypass")
f.storbinary("STOR myfile", datafile, 1024)  
f.close()

Is my file size the problem? 

Here's what the docs say:
storbinary (command, file, blocksize) 
Store a file in binary transfer mode. command should be an appropriate
"STOR" command, i.e. "STOR filename". file is an open file object which is
read until EOF using its read() method in blocks of size blocksize to
provide the data to be stored. 

Thanks a lot,

Bill