Closed stychu closed 5 years ago
Could you post your whole code, please? Don't forget to remove all sensitive information.
const { spsave } = require("spsave");
const coreOptions = {
siteUrl: 'https://.......sharepoint.com/personal/.....',
notification: true,
checkin: true,
checkinType: 1
};
const creds = {
username: process.env.username,
password: process.env.password,
// online: true
};
const fileOptions = {
folder: 'TESTING',
fileName: 'test.txt',
fileContent: 'hello world'
};
spsave(coreOptions, creds, fileOptions)
.then(function(){
console.log('saved');
})
.catch(function(err){
console.log(err);
});
I guess you're uploading to onedrive. In that case for folder please provide "Documents" value. It will upload a file to the root of your onedrive. "Documents/Testing" will create a subfolder and will upload to that subfolder.
Great!! It's working, thanks!
How I would also upload to the shared folder ??
You can upload to a shared folder if you know the exact url of a folder. Otherwise I'm not sure how to do that and have never tried.
Great! Will dig it. Thanks for this plugin great work !
I am testing spsave for automation of uploading files to the SP. I was able to save file but I have no idea where it's now.
Looking through the sahrepoint onedrive webapp interface: files / recent/ shared / recycle bin can't find the created file. Also going on the generated link gives me
NOT FOUND