0

I would like to add a couple of custom content type documents to a library that has managed content types enabled via 2013 CSOM. Most of the documentation I have seen shows how to upload documents to a library but I am attempting to create "blank" instances of these content types. I would like to essentially mimic the same actions that happen when I click the down arrow under the "New Document" button and add a new document of the specified content type.

Am I supposed to simple point the byte stream at the content type template address and "upload" it that way? How will the library know what content type I am uploading?

  • Have you tried omitting the ContentStream property? – wjervis Sep 18 '15 at 19:15
0

I searched for "sharepoint 2013 csom add content type to list" and got these links. You are seeing it as creating but it actually is adding existing content type to a list. Hope i got the question right!

How to add the content type to the list using CSOM in SharePoint 2013

How to Add a Content Type to a sub site List by CSOM

client object model add content type to list

  • may be i got the question wrong but I am not understanding ' create "blank" instances of these content types'! However, if you already have the content types you can choose which content type you want to attach to the item you are adding! c-sharpcorner.com/Blogs/10454/… – Vamsi K K Sep 18 '15 at 17:01

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.