使用Parse的saveInBackgroundWithBlock时请求正文流耗尽:

时间:2014-12-11 00:55:20

标签: ios parse-platform objective-c-blocks

问题只发生在我使用移动数据将照片上传到Parse时,我会收到“上传失败 - 请求正文流耗尽”错误。这意味着如果我的手机使用WiFi模式,一切都会顺利进行。

任何人都可以帮我解决问题吗?

谢谢, 肯尼

我保存图片的代码如下:

self.pfProfile[@"logo"] = imageFile;


// Upload Profile to Parse
[self.pfProfile saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
    [indicator stopAnimating];
    if (succeeded) {
        NSLog(@"Update Profile Successfully");
        // Notify table view to reload the recipes from Parse cloud
        //[[NSNotificationCenter defaultCenter] postNotificationName:@"refreshTable" object:self];
    } else {
        UIAlertController *alertController = [UIAlertController
                                              alertControllerWithTitle:@"Upload Failure" message:[error localizedDescription]
                                              preferredStyle:UIAlertControllerStyleAlert];
        UIAlertAction *okayAction = [UIAlertAction actionWithTitle:@"OK"
                                                             style:UIAlertActionStyleDefault handler:nil];
        [alertController addAction:okayAction];
        [self presentViewController:alertController animated:YES completion:nil];
    }
}];

0 个答案:

没有答案