XMLRPC image upload doesn't work

  1. Hi guys,

    i'm using this xmlrpc connector for my iOS 7 app:

    i can get posts from my wp and i can upload new posts, but i can't upload an image yet.

    here is my code:

    NSData *tmpFile = UIImageJPEGRepresentation(chosenImage, 1);
        NSData *imgFile = [NSData dataWithData: tmpFile];
        NSMutableDictionary *picValues = [[NSMutableDictionary alloc] init];
        [picValues setObject: imageName forKey: @"name"];
        [picValues setObject: @"image/jpeg" forKey: @"type"];
        [picValues setObject: imgFile forKey: @"bits"];
        [picValues setObject: @"true" forKey: @"overwrite"];
        NSArray *picParams = [NSArray arrayWithObjects: @"1", user, pass, picValues, nil];
        [myRequest setMethod: @"wp.uploadFile" withParameter: picParams];

    where is my failure?

    thank's martin

  2. unfortunately i don't get any failure messages. all the necessary methods for this are in the XMLRPCConnectin.h file which i imported in my project ...

Topic Closed

This topic has been closed to new replies.

About this Topic