You need to sign in to do that
Don't have an account?
Artie B
References to URLs returned by Apex ConnectApi in Salesforce1 mobile
I have a VF page that I am using as an inline page on the Opportunity detail page layout. It retrieves and displays files (FeedItems with ConnectApi.ContentCapability) from Chatter feeds on records related to the Opportunity. After making the page available for mobile, it will display within the Salesforce1 mobile app. However, there are two URLs returned with the ContentCapability class that wraps the Chatter File, downloadUrl and renditionUrl, that apparently don't work within the mobile container. The following VF, where file is a reference to an instance of ConnectApi.ContentCapability renders fine on the desktop (and in /one/one.app, incidentally), but the image does not display in the mobile app, nor does the the download link work. The title attribute works just fine.
Is there a way to "convert" these URLs to something that SF1 would understand...or do I need to use the Chatter REST API or some other method to fetch these URLs when the page is running in the mobile context?
The downloadUrl looks like
https://c.na17.content.force.com/sfc/servlet.shepherd/version/download/068o0000000wrG3?asPdf=false&operationContext=CHATTER
and the renditionUrl looks like
https://c.na17.content.force.com/sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB720BY480&versionId=068o0000000wrj0&operationContext=CHATTER&contentId=05To00000009kkc
Thanks,
Artie
<div class="col-xs-6 col-sm-3 col-md-2"> <a href="{!file.downloadUrl}" class="thumbnail"> <img src="{!file.renditionUrl}" /> </a> <div class="captionContainer"> <h6>{!file.title}</h6> </div> </div>
Is there a way to "convert" these URLs to something that SF1 would understand...or do I need to use the Chatter REST API or some other method to fetch these URLs when the page is running in the mobile context?
The downloadUrl looks like
https://c.na17.content.force.com/sfc/servlet.shepherd/version/download/068o0000000wrG3?asPdf=false&operationContext=CHATTER
and the renditionUrl looks like
https://c.na17.content.force.com/sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB720BY480&versionId=068o0000000wrj0&operationContext=CHATTER&contentId=05To00000009kkc
Thanks,
Artie
If so, please take a look at this document which describes the various custom URL linking schemes that Salesforce1 can successfullly interpret - http://bit.ly/s1deeplinking
I hope this helps.