Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Andrew Koltyakov
    @koltyakov
    You're welcome ;)
    Hanad Kubat
    @hanadkubat
    @koltyakov Hi Andrew, sorry if I am bothering you, you’ve helped me alot with the previous answer and I have one more question. What should I do if I want to publish the project to a Document Library on a Sharepoint 2013 site, and use it like that as a Single Page Application by accessing it directly from that Document Library. Thank you in advance.
    Andrew Koltyakov
    @koltyakov
    @hanadkubat, can you elaborate? npm run publish task publishes assets from local ./dist folder to spFolder (defined in ./config/app.json). If you really need to change the publishing path destination from _catalogs/masterpage to something else, e.g. SiteAssets or Style Library it can be done by editing ./config/app.json/spFolder, but I recommend the defaults. When running publish task all the files from the dist folder are uploaded with spsave to SharePoint (2013 is supported as well). Then you link assets in CEWP or script link user custom action, etc.
    Hanad Kubat
    @hanadkubat
    @koltyakov i do everything like you mentioned above but the app doesn’t make any api requests to sharepoint and then nothing loads, just a blank page without any errors. I check always the network tab, no requests are made to sharepoint to get required data for dom rendering.
    Andrew Koltyakov
    @koltyakov
    How it can be a blank page? What are you opening after assets are uploaded? You can't open uploaded HTMLs directly, but use SP page (wiki, webparts) and place Content Editor Webpart with a link to your HTML with SPA container.
    Hanad Kubat
    @hanadkubat
    I wanted to open the html directly but ok then, that answers my question, thank you 😁 @koltyakov
    Andrew Koltyakov
    @koltyakov
    @hanadkubat recorder a short walkthrough
    Hanad Kubat
    @hanadkubat
    @koltyakov THANK YOU!!! 👍💪😎
    leo9090
    @leo9090
    hi guys, I wanted to ask you wheter you have any suggestion to download files with nodejs from sharepoint
    Andrew Koltyakov
    @koltyakov
    sppull or sp-download ;)
    leo9090
    @leo9090
    thank you
    i tryied to use sppull
    but I had an issue
    Folders proceeding: 0 out of 0 [recursive scanning...]
    Error in getFolderContent: Cannot read property 'Folders' of undefined
    Core error has happened Cannot read property 'Folders' of undefined
    the code is

    const { sppull } = require("sppull");

    const context = {
    siteUrl: "xxx",
    creds: {
    username: "xxx",
    password: "xxx"
    }
    };

    const options = {
    spRootFolder: "Shared%20Documents/SSC%20Projection/ZIP",
    dlRootFolder: "W:\SCM\RawData\SSC_Proj"
    };

    sppull(context, options)
    .then((downloadResults) => {
    console.log("Files are downloaded");
    console.log("For more, please check the results", JSON.stringify(downloadResults));
    })
    .catch((err) => {
    console.log("Core error has happened", err);
    });

    Andrew Koltyakov
    @koltyakov
    almost identical to a basic sample from the readme, checked, there are no errors in the sample
    image.png
    what is the version of SharePoint you download from?
    leo9090
    @leo9090
    sharepoint online
    Andrew Koltyakov
    @koltyakov
    Can't reproduce (by making different kind of intentional mistakes). Can only suggest debugging, search a place with .Folders in sppull code base in node_mosules and logging the response.
    By providing a combination of incorrect siteUrl/paths, etc, can't get anything similar.
    image.png
    PS, Also by default checking in SPO.
    SUDARSHAN NEUPANE
    @sudnep
    How can I use this library to upload file to sharepoint library on premise. I was able to setup and was able to do get request but not post file upload. Any help would be appreciated.
    Sergei Sergeev
    @s-KaiNet
    you can use https://github.com/s-KaiNet/spsave for file uploads
    Hanad Kubat
    @hanadkubat
    Can someone help me with importing images/assets in sppp react
    Andrew Koltyakov
    @koltyakov
    @hanadkubat, I'm not including file-loader in sppp, though it can be easily added to webpack config which is exposed from sp-build-task. In ./webpack.config.js you can add any additional loaders you need.
    mert certel
    @itoldyou_gitlab
    Hı all. I want to user login with node js. Ntdl handsake. I have sp2013.
    mert certel
    @itoldyou_gitlab
    How can handle this with express
    Andrew thanks for help. Should i pass this header <ntlm authorization header> or username,password and host enoght for login?
    Andrew Koltyakov
    @koltyakov
    An Express application usually deals with its own auth, backend methods authenticate using a service account and expose only a part of SharePoint API.
    But it really depends. Too vague to answer anything specific.
    mert certel
    @itoldyou_gitlab
    Okey, i will try this. i will create a backend web API. And i have a login screen in a frontend. When user enter a username and password, try to login sp2013.
    Thats what i need sır.
    Sergei Sergeev
    @s-KaiNet
    @itoldyou_gitlab since it's ntlm, you can try adding windows auth to your express app, but afaik nodejs and windows auth are not the best friends...
    mert certel
    @itoldyou_gitlab
    @s-KaiNet Okey thanks. İ will try to add ntlm handshake.
    mert certel
    @itoldyou_gitlab
    By the way should i install node-sp-auth-config ?
    Andrew Koltyakov
    @koltyakov
    node-sp-auth-config is included as a dependency in node-sp-auth, so not necessarily should be explicitly installed
    mert certel
    @itoldyou_gitlab
    @koltyakov i am still getting error with 401 code. Can you help me ? https://stackoverflow.com/questions/58927570/sharepoint-2013-authentication-node-js
    is there any config central admin ?
    Hanad Kubat
    @hanadkubat
    Why is sppp not loading images from local dev environment but instead it loads images from sharepoint directly before they are even published?
    user2342895798
    @user2342895798
    I'm trying to create a text file containing a string using sp-request. The file is being created but the content is prefixed with a " and all quote marks within the string are escaped with a . Any advice? Here is my code: spr.post('${SCURL}/_api/web/GetFolderByServerRelativeUrl('${FolderServerRelativeUrl}')/Files/add(url='${FileName}',overwrite=true)',{ headers: { 'X-RequestDigest': digest, 'content-length':new Buffer(content).byteLength }, body:content })
    Andrew Koltyakov
    @koltyakov
    Encoding equal to null should be established. Please take a look how spsave uploads documents.
    Hanad Kubat
    @hanadkubat
    Hello, How does the process of adding multiple list items work in sppp with sharepoint 2013? I get a batch error when adding multiple items using the official documentation
    Andrew Koltyakov
    @koltyakov
    SPPP is not related to the API. It's a project generator/starter and a set of project automation tasks.
    Regarding the API question, batch API was not supported in SP 2013. The way to go is Promise.all instead.
    eralardz
    @eralardz
    afbeelding.png
    Hello everyone. I'm trying the following example: https://www.linkedin.com/pulse/getting-started-react-local-development-sharepoint-andrew-koltyakov/. It works fine with user credentials (SAML/ADFS). However, I'd like to use OnDemand authentication because we work in a multi-user environment with 2FA. When I try it out, Electron opens up fine, and I can log in with 2FA, but it just loads the SharePoint page. When I close the popup window I am not authenticated. Can you guys help me?
    afbeelding.png
    When I close the Electron window I get this error ^