0

Is there a way to access a direct URL of a public image when I know its blob.ID?

1 Answers1

1

You can upload blob and make it public

[QBContent TUploadFile:file fileName:@"Great Image" contentType:@"image/png" isPublic:YES delegate:self];

// QuickBlox queries delegate
- (void)completedWithResult:(Result *)result{
    // success result
    if(result.success){
        if([result isKindOfClass:QBCFileUploadTaskResult.class]){
            QBCFileUploadTaskResult *res = (QBCFileUploadTaskResult *)result;
            NSString *publicUrl = res.uploadedBlob.publicUrl;
        }
    }
}
Rubycon
  • 18,156
  • 10
  • 49
  • 70
  • This is true, but I'm trying to access someone else's public image, so I do not know the publicUrl for it. I guess the only way is the hard way: access user blobId, query for this Blob and get UID and try retrieving this image by UID? – user2137346 Apr 12 '13 at 19:48
  • You can share all your blobs via Custom Objects API - here is my answer http://stackoverflow.com/questions/15979930/retrieving-all-blobs-from-opponent-ios-content-chat-modules – Rubycon Apr 14 '13 at 10:05