• James_SFDC
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 7
    Replies

I have an application that use the chatter API to upload file attachments as described in the chatter REST API. I'm doing a multiform POST and I am able to upload the file without issue. However, I'm not getting a preview generated. I'm testing with simple image files (png, gif) and no previews are generated. If I create the exact same post with in the web interface, previews are generated. The file name has the file extension and I'm also setting the proper mime type on the binary multiform part.

 

So is preview generation supported when uploading through the API? If it is supported, are there any tricks or options to doing it? My request looks pretty much just like the example in chatter documentation.

 

Thanks

Is there any way that a document uploaded to a Content Library (using the REST API) can be associated with the Related Content list of an Account, Contact, or Opportunity record using a REST or SOAP API?

 

Thanks

Peter

  • September 23, 2011
  • Like
  • 0

Hi Simon, I was hoping you could help me out with another question: what API in REST (or SOAP in case REST does not support it) do I use to find out what Content Types are associated with a Library?


- ContentWorkspace contains DefaultRecordTypeID, however, it does not point to other Content Types associated with the same ContentWorkSpace
- For RecordType you can list all records of type “ContentVersion” but these records do not point back to a ContentWorkspace
- With DescribeLayout(“ContentVersion”, null) all ContentTypes are listed but they do not contain any references back to a ContentWorkspace (unless I missed it somehow)


I suspect there is another intermediate record or API that returns the association between Libraries and Content Types; please point me in the right direction.


Thanks
Peter