views:

38

answers:

1

I am not able to FTP a file from Iphone device(with wifi) to remote FTP server. Most of the times, i am getting "stream open error" and very few times, the file is getting FTPed. But while checking FTP server, the uploaded file is empty i.e the file size is 0 bytes. But the file which is uploaded has some definite size.

Note: i use active mode to FTP and FTP server to accept active connections so, where is the problem? Is there a problem with FTP server? Or is there a problem from the sender i.e is there a problem with the source code?

:) Vijay

+1  A: 

Maybe changing the transfer mode from active to passive will help. FTP uses two connections - control connection (for sending commands) and data connection (for upload/download/directory listing).

In active mode FTP Server opens data connection to the ftp client. It's blocked by most firewalls. In passive mode FTP client opens data connection to server. For details see our webpage about FTP active and passive mode differences.

Martin Vobr
But the server i use has only active FTP connection. When i tried FTP with another FTP server which works in either mode, in both the modes, i am able to send file successfully. In the server too, the file size is shown properly.
Vijay
Now, i am able to FTP files from iPhone consistently[though i haven't done code change], only a 0 bytes file exist on the server[server in which i reported problems].
Vijay