ftplib storbinary problem

Sandipan Gangopadhyay sandipan at vsnl.com
Fri May 18 09:10:25 EDT 2001


I am using storbinary('STOR a.jpg', openfilepointer, 1024) from the ftplib
to upload a picture to an FTP server (server2031.virtualave.net)

While this works fine with ASCII files, it is not working for .jpg where we
need binary ! Depending on the block size (like 1024 above), only 274 bytes
or so are getting uploaded. The function returns a successful transfer.

I am trying this on pythonwin, on Win 98. I have tried blocksize range from
0 to 10240000. I have tried both active and passive mode.

Anyone know where I am going wrong ?

Thanks,

Sandipan






More information about the Python-list mailing list