Parse中的文件名错误

时间:2016-05-13 01:32:50

标签: ios objective-c parse-platform

当我将PFFile上传到User类时,我有时收到此消息:

[Error]: Bad file name: profileImage.png (Code: 122, Version: 1.13.0)

这是代码

PFUser *currentUser = [PFUser currentUser];
NSData *imageData = UIImagePNGRepresentation(profileImageView.image);
PFFile *imageFile = [PFFile fileWithName:@"profileImage.png" data:imageData];
currentUser[@"profileImageFile"] = imageFile;
    [currentUser saveInBackgroundWithBlock:^(BOOL succeeded, NSError * _Nullable error) {
        if(!succeeded){
            NSLog(@"error:%@",error);
        }
    }];
}

这个文件名真的很糟糕吗?有人用这个文件名上传PFFile。

0 个答案:

没有答案