I'm trying to programmatically add an item to a document library in the Sharepoint 2013 Preview that comes with Office 365. I've managed to add an item by using the code fragment below (from a provider-hosted app in C#).
However I can't seem to find an example for doing the same thing with a document library (neither in MSDN documentation nor with Google).
var creationInformation = new ListItemCreationInformation();
Microsoft.SharePoint.Client.ListItem listItem = list.AddItem(creationInformation);
listItem.FieldValues["Foo"] = "Bar";
listItem.Update();
clientContext.ExecuteQuery();
I'd be very glad if someone could give me some hints regarding this problem. I'm not exclusively interested in a C# solution, if you know how to do it with JavaScript or via REST API then I'd be happy to hear about that as well. Thanks in advance!
