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

        "text":"Please take a look at these files."
     "items": [
        {"id": "069D00000001IOh"},
        {"id": "069D00000002IOg"}

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:


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


If the file is uploaded to me then it is by default privately shared.

You need to open up file access via sharing.

Refer Who Can See My File?

file sharing

  • How do you this programmatically via the REST API? Jul 15 '17 at 3:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.