error uploading photo : tumblr api ios

110 views
Skip to first unread message

rishu patkar

unread,
Apr 10, 2015, 2:04:35 AM4/10/15
to tumbl...@googlegroups.com

When I try to upload a image using following code,

NSString *imagePath = [photo getAbsouluteMediaPath]; // imagePath = assets-library://asset/asset.JPG?id=F6DDD72D-5E08-4C9C-9D5C-E7382578B3FC&ext=JPG

        [[TMAPIClient sharedInstance] photo:name filePathArray:@[imagePath] contentTypeArray:@[@"image/jpg"] fileNameArray:@[@"Photo.jpg"] parameters:@{@"caption" : @"test"} callback:^(id response, NSError *error) {

            if (error){
                NSLog(@"Error posting to Tumblr %@",error);
            }
            else{
                NSLog(@"Posted to Tumblr");
            }
        }];

Im getting following error,

Error Domain=Request failed Code=400 "The operation couldn’t be completed. (Request failed error 400.)"

Please help me to find the issue!

Reply all
Reply to author
Forward
0 new messages