Upload File API using NodeJS

Copper Contributor

Upload file API is giving ECONRESET on hitting from my nodeJS server.

I am hitting the api using request module

const options = {
            url: `${Constants.SHAREPOINT.BASE_URL}Web/GetFolderByServerRelativeUrl('${foldername}')/Files/Add(url='${filename}', overwrite=true)`,
            method: Endpoints.METHOD.POST,
            headers: {
                'Authorization': `Bearer ${token}`,
                'Accept': 'application/json;odata=verbose',
                'X-RequestDigest': Config.sharepoint_env.digest,
                'Content-Length': 100000
            },
            data: fileBuffer
        };
@SharePoint Team and sharepoint developers  Please look into this matter
0 Replies