我正在從iOS本機應用程序獲取salesforce的附件。如何在ios中訪問Salesforce附件正文(base64二進制數據)?
我必須在我的iPhone應用程序中顯示特定對象(如Leads,Contacts等)的salesforce附件。爲此,我使用了Rest Api
並獲得了響應正文。但在響應身體有url,但我想附件身體的二進制數據。
這裏是我的代碼:
我的REST API請求
NSString *attachments=[NSString stringWithFormat:@"select Name,Body, ContentType from Attachment"];
SFRestRequest *request = [[SFRestAPI sharedInstance] requestForQuery:attachments];
[[SFRestAPI sharedInstance] send:request delegate:self];
我得到了身體的反應在以下格式:
{
Body = "/services/data/v23.0/sobjects/Attachment/00P90000004SRFlEAO/Body";
ContentType = "application/video";
Name = "Video.MOV";
attributes = {
type = Attachment;
url = "/services/data/v23.0/sobjects/Attachment/00P90000004SRFlEAO";
};
}
謝謝您的回答,但請澄清正是我所要做的,哪些參數必須通過與URL請求我。應此要求網址 - 實例網址+附件正文網址 – YogiBhoi