Skip to main content

Posts

Showing posts from September, 2016

Uploading multiple files to SharePoint List

Wow SharePoint is doing great with SharePoint rest api now you can do almost everything related to SharePoint using rest api. Today I am trying to upload multiple documents to SharePoint list item. You know what the problem is? You first need to create a SharePoint list item and then you can upload documents to the same SharePoint list item. So let’s now try to create a new SharePoint list item. function CreateNewItem() {     var data = {         __metadata: { 'type': "SP.Data.ListItem" },         Title: $('#Title').val()     };     $.ajax({         //_spPageContextInfo.webAbsoluteUrl get current SharePoint site url         url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists/GetByTitle('" + ListTitle + "')/Items",         type: "POST",         headers: {             "accept": "application/json;odata=verbose",             "X-RequestDigest": $("#__REQUESTDIGEST").val