访问存储在公共blob中的图像的直接URL - iOS内容模块

时间:2013-04-12 03:05:15

标签: quickblox

当我知道它的blob.ID时,有没有办法访问公共图像的直接网址?

1 个答案:

答案 0 :(得分:1)

您可以上传blob并将其公开

[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;
        }
    }
}