Quantcast
Channel: Active questions tagged feeditem+chatter - Salesforce Stack Exchange
Viewing all articles
Browse latest Browse all 68

Best way to upload Chatter file

$
0
0

According to this document,

In version 36.0 and later, you can’t create a feed post and upload a binary file in the same request. Upload files to Salesforce first, and then use the file IDs to attach one or more files to a feed post.

So now you have to upload the file first, then reference the file Id when creating a feed element from the REST API

{"body":{"messageSegments":[     {"type":"Text","text":"Please take a look at these files."     }  ]},"capabilities":{"files":{"items": [        {"id": "069D00000001IOh"},        {"id": "069D00000002IOg"}     ]  }},"subjectId":"me","feedElementType":"FeedItem"}

My question is, what is the best practice for uploading files to Salesforce? The only way I can see to just upload a file is using this resource:

/services/data/v40.0/connect/files/users/me

However, if I upload it to "me" will everyone who has access to the record have access to the file?


Viewing all articles
Browse latest Browse all 68

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>