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.
<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
and the renditionUrl looks like
Thanks,
Artie