Note that there are some explanatory texts on larger screens.

plurals
  1. POUpload file on FTP is not working in iOS
    primarykey
    data
    text
    <p>I have upload file on FTP using this<a href="https://github.com/valentinradu/WhiteRaccoon" rel="nofollow"> classes.</a></p> <p>I am using this method for uploading</p> <pre><code> - upload { //the upload request needs the input data to be NSData //so we first convert the image to NSData UIImage * ourImage = [UIImage imageNamed:@"space.jpg"]; NSData * ourImageData = UIImageJPEGRepresentation(ourImage, 100); //we create the upload request //we don't autorelease the object so that it will be around when the callback gets called //this is not a good practice, in real life development you should use a retain property to store a reference to the request WRRequestUpload * uploadImage = [[WRRequestUpload alloc] init]; uploadImage.delegate = self; //for anonymous login just leave the username and password nil uploadImage.hostname = @"xxx.xxx.xxx.xxx"; uploadImage.username = @"myuser"; uploadImage.password = @"mypass"; //we set our data uploadImage.sentData = ourImageData; //the path needs to be absolute to the FTP root folder. //full URL would be ftp://xxx.xxx.xxx.xxx/space.jpg uploadImage.path = @"/space.jpg"; //we start the request [uploadImage start]; } -(void) requestCompleted:(WRRequest *) request{ //called if 'request' is completed successfully NSLog(@"%@ completed!", request); } -(void) requestFailed:(WRRequest *) request{ //called after 'request' ends in error //we can print the error message NSLog(@"%@", request.error.message); } -(BOOL) shouldOverwriteFileWithRequest:(WRRequest *)request { //if the file (ftp://xxx.xxx.xxx.xxx/space.jpg) is already on the FTP server,the delegate is asked if the file should be overwritten //'request' is the request that intended to create the file return YES; } </code></pre> <p>But I am not successfully upload file on FTP. Also I am not getting any error.</p> <p>So, How to upload file on FTP?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload