
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Nodejs module for saving files in SharePoint (both on premise and online).
###Install:
npm install spsave
###Usage:
var spsave = require("spsave");
spsave(options, callback);
###Options:
siteUrl
- required, string url of the siteusername
- required, string user namepassword
- required, string passwordfolder
- required, site-relative url to folder, which will be used to save your file. For example for library http://sp2013/sites/dev/SiteAssets
folder will be equal SiteAssets
fileName
- required, string file namefileContent
- required, string file contentdomain
- for on premise only, string domain nameworkstation
- for on premise only, string workstation nameisOnPrem
- optional, function returns boolean, used to determine if the site is SharePoint online or on premise, default implementation - return (urlparse(url)).host.indexOf(".sharepoint.com") === -1;
log
- optional, boolean to enable logging inside spsave, default is trueappWebUrl
- optional, site-relative string url to your app web (for apps development). For example if your root web is http://sp2013.com/sites/dev
and app full url is http://sp2013-apps.[guid].com/sites/dev/yourapp
, then appWebUrl
will be yourapp
###Callback Function which accepts error object as first argument and result of file upload as second.
###Samples
Upload file file.txt
to SharePoint online site into the SiteAssets library:
var spsave = require("spsave");
spsave({
siteUrl: "https://[domain].sharepoint.com/sites/dev",
username: "[user]@[domain].onmicrosoft.com",
password: "[password]",
folder: "SiteAssets",
fileName: "file.txt",
fileContent: "hello world"
}, function(err, data){
if(err){
console.log("Error occurred");
} else{
console.log(data);
}
});
SharePoint on premise version:
var spsave = require("spsave");
spsave({
siteUrl: "[siteurl]",
username: "[username]",
password: "[password]",
workstation: "[workstation name]"
folder: "SiteAssets",
fileName: "file.txt",
fileContent: "hello world"
}, function(err, data){
if(err){
console.log("Error occurred");
} else{
console.log(data);
}
});
FAQs
Save files in SharePoint using node.js easily
The npm package spsave receives a total of 3,098 weekly downloads. As such, spsave popularity was classified as popular.
We found that spsave demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.