I don't think it is a good idea to keep the file_id as a custom attribute in KCSUser.
Because Kinvey doesn't allow programmers to modify (or add or delete) backend data, if a user changes profile image, we can do nothing to update to the new image.
You can easily modify backend data Yonghui...
Aris Sarris
My problem is that when I download and present this image,updating UI takes too long.
My Images have size 6kB and I use SDK 1.26.3 (latest)
Here's my code:
____________________________
[KCSFileStore downloadFile:file_id options:nil completionBlock:^(NSArray *downloadedResources, NSError *error) {
if (error == nil) {
KCSFile* file = downloadedResources[0];
NSURL* fileURL = file.localURL;
ProfileImage.image = [UIImage imageWithContentsOfFile:[fileURL path]];
} else {
NSLog(@"Got an error: %@", error);
}
} progressBlock:nil];
}
____________________________
Is there any other way I could possibly store an image and have access to it through KCSUser?
Any suggestions?
1 person has this question