Closed Asthay97 closed 1 year ago
Hey @Asthay97,
You have a wrong path in configuration object:
"Shared%20Documents/docverify"
while it's just "Shared Documents" library with no folders:
Hi @koltyakov, Thanks a lot for helping out. The code worked after fixing the path.
Great to hear it worked. Thanks for the feedback!
Code: ``` const context = { siteUrl: 'https://.sharepoint.com',
creds: {
username: "username>@<tenant.onmicrosoft.com",
password: "***",
online: true
}
};
const options2 = { spRootFolder: "Shared%20Documents/docverify", dlRootFolder: "./docverify" };
SPPull.download(context, options2) .then((downloadResults) => { console.log("Files are downloaded", downloadResults); console.log("For more, please check the results", JSON.stringify(downloadResults)); }) .catch((err) => { console.log("Core error has happened", err); });
Screenshot of sharepoint image