Javascript

SharePoint Attachments Operations with JavaScript

SharePoint attachments (files uploaded directly onto a list item, not into a document library) are common in forms and ticketing-style lists. Here’s how to create, read, and delete them with plain JavaScript against the REST API, no PnPjs required. In this post: Uploading an attachment · Reading attachments · Downloading the actual file content ·

SharePoint Attachments Operations with JavaScript Read More »

Troubleshooting Node.js Installation: Common Issues and Fixes

Seven real installation problems people hit with Node.js and npm, and the actual fix for each: version conflicts, permission errors, SSL/proxy issues, and the Windows-specific build-tools error that trips up more people than any of the others. In this post: Conflicting versions · Permission errors (EACCES) · SSL certificate errors · Proxy and firewall restrictions

Troubleshooting Node.js Installation: Common Issues and Fixes Read More »

NPM Link and Gulp: Understanding the Power of Local Development

npm link creates a symlink between a globally-linked local package and another project, so you can develop a package and test it live in a consuming project without publishing it to the registry first. In this post: Worked example: building a custom Gulp plugin · The gotcha to know about · Confirming what actually got

NPM Link and Gulp: Understanding the Power of Local Development Read More »

How to Avoid List Throttling in SharePoint

Worth a direct correction before anything else: the “indexed column” PowerShell example that circulates for this topic (`Set-PnPListItem` with a value) doesn’t create an index at all. It just sets a field’s value on one item, something entirely different. This post covers the real mechanism for indexing a column, the real cap that mechanism runs

How to Avoid List Throttling in SharePoint Read More »

Regular Expressions (Regex) : Quick Guide

Regex looks intimidating until you’ve internalized maybe a dozen symbols, after that it’s just the fastest way to validate, search, or extract text by pattern instead of writing a string-parsing function by hand. This is a working reference: the symbols that come up constantly, three real examples in different languages, and when it’s actually the

Regular Expressions (Regex) : Quick Guide Read More »

Gulp: Automate Your Workflow Like a Pro

Gulp is a JavaScript task runner that automates the repetitive parts of a front-end build (minification, compilation, linting, browser reload) using plain JavaScript instead of a config file. It processes files through Node.js streams rather than writing intermediate files to disk, which is a meaningful part of why it’s fast: less disk I/O between each

Gulp: Automate Your Workflow Like a Pro Read More »

Methods on how to Add Attachments to SharePoint List

SharePoint doesn’t have one “add attachment” button that works everywhere, which method you reach for depends on whether you’re writing client-side JavaScript, building an SPFx web part, or automating something from a script. The three approaches below all do the same thing: attach a file to a specific list item. The difference is what kind

Methods on how to Add Attachments to SharePoint List Read More »

SharePoint REST API File Uploads Using JavaScript and PnPjs

Two ways to upload a file to a SharePoint document library via code (raw REST calls, or PnPjs) plus what changes once the file is big enough that a single request isn’t the right approach anymore. In this post: Option 1: raw REST API · Option 2: PnPjs · Large files: chunked uploads · Validating

SharePoint REST API File Uploads Using JavaScript and PnPjs Read More »

Remove All Permissions in a SharePoint Site Collection

Sometimes a SharePoint site collection needs to be locked down to just you: before a migration, before deletion, or because everyone who had a reason to be in there no longer does. This covers both ways to strip every permission except your own: through the admin center by hand, or with PowerShell when you’re doing

Remove All Permissions in a SharePoint Site Collection Read More »