【发布时间】:2016-06-06 11:30:18
【问题描述】:
我正在尝试上传应用程序的每个用户都可以看到的文件,但上传的文件看起来是私有的,只有其创建者才能下载或流式传输它们。
这是我用来在视图控制器中上传文件的代码:
StatusShareUpdate* update = [[StatusShareUpdate alloc]init];
update.attachment = image;
[self.store saveObject:update withCompletionBlock:^(NSArray *objects, NSError *error) {
} withProgressBlock:nil];
StatusShareUpdate.h
@property (nonatomic, retain) UIImage* attachment;
StatusShareUpdate.m
- (NSDictionary *)hostToKinveyPropertyMapping {
return @{@"attachment": @"attachment"};
}
+ (NSDictionary *)kinveyPropertyToCollectionMapping {
return @{@"attachment":KCSFileStoreCollectionName};
}
有什么想法吗?
【问题讨论】:
标签: objective-c xcode file kinvey