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
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