2

As the question suggests we are looking for creating functionality of Upload/Download using Node.js. We have our destination in SharePoint 2013 document library where we want to upload files.

First question is it possible to achieve this using Node.js? If yes then how?

If anybody can explain what's node and how is it possible to communicate to another server for fetching or posting data(basically SharePoint)?

Any help will be much appreciated.

1

There is a specific library for SharePoint. You can download it from

https://github.com/lstak/node-sharepoint

Then use it as

contacts.add({LastName: 'Picolet', FirstName: 'Emma'}, function (err, data) {
// data contains the new item returned from server.
// data.Id will be the server assigned Id.
})
| improve this answer | |
  • Hi Thanks very much for your response, but it seems that with this npm we can only performs a set of operations. I have tried using the node-sharepoint-api too but it looks this also do not support it. – Sree Kuttan Jan 19 '15 at 11:48
0

Hi I have found out a way to do this. James was correct in pointing out that we need to do stuff we cannot just rely on built in classes. I had to edit a file present in the sharepoint lib folder. In the file I had to rewrite a method which was already present and tweak it to upload a file in a document library.

The file that I edited was "node_modules\node-sharepoint-rest\lib\CustomLists.coffee" in this file there are methods which are making an ajax call to the sharepoint list. I edited the method which uploaded an attachement to a list item.

It was simple but had to dig in very much to make it work Thanks for all the help.

| improve this answer | |

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.