Upload a file on a Sharepoint website through c#
I've a file library on a sharepoint 2010. I'm using the Sharepoint library and I want to upload a file.
开发者_StackOverflowI found a lot of example about this, the problem is that I've some additional fields in the sharepoint file library, and I don't see how to specify them.
Here is one of the example I saw: http://msdn.microsoft.com/en-us/library/ms454491.aspx
One of these fields is mandatory so I've to set it when I add a file.
How can I do this?
Thank you!
Here is a sample of how you might do this ("Method 2" in the example):
http://www.learningsharepoint.com/2010/07/12/programmatically-upload-document-using-client-object-model-sharepoint-2010/
In a nutshell, you need to upload the file first and then update any required metadata fields.
精彩评论