You need to sign in to do that
Don't have an account?
Nader Hadji Ghanbari
How to create a File and link it to a case via REST API?
In the Lightning UI if you attach a file to a Case it won't be created as an Attachment, rather as a File. I could not find anything about this in the REST API docs.
What I found just by try and error is that one must create a ContentBody, a ContentDocument, a ContentDocumentVersion and finally a ContentDocumentLink to link it to the Case. If this is really the way, how to upload the file in the first place? i.e. how to create a ContentBody? Again nothing related to this in the docs.
My assumption is that still a multi-part request with a `Body` part should work but haven't tried it yet. Any help would be appreciated.
What I found just by try and error is that one must create a ContentBody, a ContentDocument, a ContentDocumentVersion and finally a ContentDocumentLink to link it to the Case. If this is really the way, how to upload the file in the first place? i.e. how to create a ContentBody? Again nothing related to this in the docs.
My assumption is that still a multi-part request with a `Body` part should work but haven't tried it yet. Any help would be appreciated.