tags:

views:

71

answers:

1

Hello, I'm trying to use S7FTPRequest to upload files to an FTP server:

S7FTPRequest *ftp = [[S7FTPRequest alloc] initWithURL:[NSURL URLWithString:@"ftp://ftp.abc.com/aaa/files/"]       
toUploadFile:[[NSBundle mainBundle] pathForResource:@"info" ofType:@"plist"]];

  ftp.username = @"name";
  ftp.password = @"pass";
  ftp.directoryName = @"/aaa/files/";
  ftp.delegate = self;
  ftp.filePath = @"/users/meir/Stuart-Highway.jpg";
  ftp.didFinishSelector = @selector(uploadFinished:);
  ftp.didFailSelector = @selector(uploadFailed:);
  ftp.willStartSelector = @selector(uploadWillStart:);
  ftp.didChangeStatusSelector = @selector(requestStatusChanged:);
  ftp.bytesWrittenSelector = @selector(uploadBytesWritten:);

  [ftp startRequest];

After that, I am getting the message (in console): Will transfer 44799 bytes.

And it does nothing. After a while I am getting a timeout message.

What am I doing wrong?

A: 

Problem Solved. That code is perfect. You have to keep the RunLoop running in order to run the loop.

Meir