Skip to content

DesignyourCode/vercel-blob-storage-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vercel Blob Storage Downloader

A Node.js utility to download all files from your Vercel Blob Storage.

Features

  • Downloads all files from your Vercel Blob Storage
  • Concurrent downloads for better performance
  • Progress tracking and colored console output
  • Skip existing files (with force download option)
  • Configurable download directory
  • Detailed download summary

Installation

  1. Clone this repository
  2. Install dependencies:
npm install

Configuration

  1. Copy .env.example to .env:
cp .env.example .env
  1. Get your environment variables from Vercel:

BLOB_READ_WRITE_TOKEN

  • Go to Vercel Dashboard
  • Navigate to Storage > Blob
  • Select your store
  • Click "Connect to Project"
  • Copy the BLOB_READ_WRITE_TOKEN

VERCEL_PROJECT_ID

  • Go to Vercel Dashboard
  • Select your project
  • Go to Project Settings
  • The Project ID is listed at the top of the General section

VERCEL_ACCESS_TOKEN

  • Go to Vercel Dashboard
  • Click on your avatar in the top right
  • Go to Settings
  • Navigate to Tokens in the left sidebar
  • Create a new token with appropriate permissions
  • Copy the generated token

VERCEL_STORE_ID

  • Go to Vercel Dashboard
  • Navigate to Storage > Blob
  • Select your store
  • The Store ID is in the URL: https://vercel.com/dashboard/stores/blob/store_[YOUR_STORE_ID]
  • Copy the ID portion after store_
  1. Update your .env file with all tokens:
BLOB_READ_WRITE_TOKEN=your_blob_token_here
VERCEL_PROJECT_ID=your_project_id_here
VERCEL_ACCESS_TOKEN=your_access_token_here
VERCEL_STORE_ID=your_store_id_here

Usage

Basic usage:

npm run start

Example Output

Fetching file list... ✓ Found 42 files

Starting downloads...
Downloaded: images/photo1.jpg
Downloaded: documents/report.pdf
Skipped: images/logo.png (already exists)
...

Download Summary:
✓ Successfully downloaded: 40
⚠ Skipped: 1
✗ Failed: 1

Errors:
images/corrupt.jpg: Failed to download: 404 Not Found

Troubleshooting

If you encounter any issues:

  1. Verify your BLOB_READ_WRITE_TOKEN is correct
  2. Ensure you have write permissions in the download directory
  3. Check your network connection
  4. Try reducing concurrency with --concurrency 1 for debugging

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published