Upload file to server using SCRFTPRequest

48 Views Asked by At

Am uploading a file on FTP server in an iOS app using SCRFTPRequest.

An error occurs:

Unable to create request(bad url?)

CODE:

filePath = [[NSBundle mainBundle] pathForResource:@"demo" ofType:@"rtf"];

SCRFTPRequest *ftpRequest = [[SCRFTPRequest alloc] initWithURL:[NSURL URLWithString:@"ftp://130.23.45.4/demo"]
                                              toUploadFile:filePath]; 

ftpRequest.username = @"user";

ftpRequest.password = @"pass";

ftpRequest.delegate = self;

[ftpRequest startRequest];

[ftpRequest startAsynchronous]
0

There are 0 best solutions below