I am familiar with user interface of SharePoint but I dont know SharePoint from programming point of view. I have a JavaScript application and I need on the button click to send a file from a variable to SharePoint site. Using Fiddler I caught that there is a something like this https://site.domain/_vti_bin/Copy.asmx?op=CopyIntoItems and I think that this could do what I need. But can I somehow specified where to save the file and specified the file?

I would be glad for any help. Thank you

1 Answer 1


You should create the JavaScript application which uses SharePoint's REST API. What you are looking for is how to upload a file to SharePoint site using REST API. There's a detailed guide on MSDN about Upload a file by using the REST API and jQuery which should get you started.

See also e.g:

  • Thank you Moe for your answer. I tried it via REST but I have some issues. I tried to connect to SHP by use: var executor = new SP.RequestExecutor(appweburl); executor.executeAsync() in my JS code but I need SP.js file. I searched on the internet but I didn't find how or where to find this file. My application will not run on the same pc where SHP is installed so if this file is a part of SHP installation folder how can I import this file into my js code? Thanks for any answer.
    – soldous
    Nov 1, 2016 at 9:44
  • For your question, sp.js should be already on your SharePoint's files on /_layouts/15/sp.js. See e.g. blog.qumsieh.ca/2013/10/30/… to get started on referencing it.
    – moe
    Nov 1, 2016 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.