Skip to content

A SharePoint Framework (SPFx) ListView Command Set Extension that allows users to select multiple files from a document library and download them as a single ZIP file. Built with SPFx, PnPjs, and JSZip for seamless integration.

Notifications You must be signed in to change notification settings

sunilshetty07/spfx-commandset-zip-download

Repository files navigation

create-zip-extension

Summary

update Sharepoint Site URL in serve.json and DownloadAsZipCommandSet.manifest file

SPFx Extension – Download Selected Files as ZIP

This SharePoint Framework (SPFx) ListView Command Set Extension adds a custom command in document libraries that allows users to select one or more files and download them as a single ZIP file.

🔹 Features

  • Integrates directly into the SharePoint library command bar.
  • Works with multiple file selections.
  • Downloads all selected files in a compressed .zip archive.
  • Built using SPFx, PnPjs, and JSZip (or any zip library you used).
  • Provides a seamless way for end users to bulk download files without multiple clicks.

🔹 How it works

  • User selects one or more files in the SharePoint library.
  • A custom “Download as ZIP” command appears in the command bar.

When clicked:

  • Files are fetched from SharePoint using REST/PnPjs.
  • Files are compressed into a ZIP archive.
  • The ZIP is downloaded to the user’s machine.

🔹 Use cases

  • Quickly downloading multiple related documents.
  • Sharing grouped files with external users.
  • Avoiding repetitive single-file downloads.

Used SharePoint Framework Version

version

Applies to

Get your own free development tenant by subscribing to Microsoft 365 developer program

Prerequisites

Any special pre-requisites?

Solution

Solution Author(s)
folder name Author details (name, company, twitter alias with link)

Version history

Version Date Comments
1.1 March 10, 2021 Update comment
1.0 January 29, 2021 Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


Minimal Path to Awesome

  • Clone this repository
  • Ensure that you are at the solution folder
  • in the command-line run:
    • npm install
    • gulp serve

Include any additional steps as needed.

Features

Description of the extension that expands upon high-level summary above.

This extension illustrates the following concepts:

  • topic 1
  • topic 2
  • topic 3

Notice that better pictures and documentation will increase the sample usage and the value you are providing for others. Thanks for your submissions advance.

Share your web part with others through Microsoft 365 Patterns and Practices program to get visibility and exposure. More details on the community, open-source projects and other activities from http://aka.ms/m365pnp.

References

About

A SharePoint Framework (SPFx) ListView Command Set Extension that allows users to select multiple files from a document library and download them as a single ZIP file. Built with SPFx, PnPjs, and JSZip for seamless integration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published