The query below that returns everything I need to build a list of Content Documents for a given ContentWorkspace. What I can't seem to do is build a URL, using the ContentDocumentId, that will allow for downloading of the document in a Sites VF page.
Select Id, ContentWorkspaceId, ContentDocumentId, CreatedDate, SystemModstamp, IsOwner, IsDeleted,
ContentDocument.Id, ContentDocument.Title, ContentDocument.PublishStatus
Where contentWorkspaceId = '058500000004COF' and ContentDocument.PublishStatus ='P'
order by ContentDocument.Title
If I deliver the Content Document I get a URL that I can create a link with but I do NOT see that Id used in the link below in my query at all. The link looks like this.
<a href="https://na3.salesforce.com/sfc/p/300000000ETq0R76A1g2d65F.RjvA2za5BXBKZg=">My Doc</a>
Any help or pointers in the right direction would be greatly appreciated.