🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@payloadcms/storage-vercel-blob

Package Overview
Dependencies
Maintainers
9
Versions
605
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@payloadcms/storage-vercel-blob

Payload storage adapter for Vercel Blob Storage

3.41.0
latest
Source
npm
Version published
Weekly downloads
9.5K
-60.4%
Maintainers
9
Weekly downloads
 
Created
Source

Vercel Blob Storage for Payload

This package provides a simple way to use Vercel Blob storage with Payload.

NOTE: This package removes the need to use @payloadcms/plugin-cloud-storage as was needed in Payload 2.x.

Installation

pnpm add @payloadcms/storage-vercel-blob

Usage

  • Configure the collections object to specify which collections should use the Vercel Blob adapter. The slug must match one of your existing collection slugs.
  • Ensure you have BLOB_READ_WRITE_TOKEN set in your Vercel environment variables. This is usually set by Vercel automatically after adding blob storage to your project.
  • When enabled, this package will automatically set disableLocalStorage to true for each collection.
  • When deploying to Vercel, server uploads are limited with 4.5MB. Set clientUploads to true to do uploads directly on the client.
import { vercelBlobStorage } from '@payloadcms/storage-vercel-blob'
import { Media } from './collections/Media'
import { MediaWithPrefix } from './collections/MediaWithPrefix'

export default buildConfig({
  collections: [Media, MediaWithPrefix],
  plugins: [
    vercelBlobStorage({
      enabled: true, // Optional, defaults to true
      // Specify which collections should use Vercel Blob
      collections: {
        media: true,
        'media-with-prefix': {
          prefix: 'my-prefix',
        },
      },
      // Token provided by Vercel once Blob storage is added to your Vercel project
      token: process.env.BLOB_READ_WRITE_TOKEN,
    }),
  ],
})
OptionDescriptionDefault
enabledWhether or not to enable the plugintrue
collectionsCollections to apply the Vercel Blob adapter to
addRandomSuffixAdd a random suffix to the uploaded file name in Vercel Blob storagefalse
cacheControlMaxAgeCache-Control max-age in seconds365 * 24 * 60 * 60 (1 Year)
tokenVercel Blob storage read/write token''
clientUploadsDo uploads directly on the client to bypass limits on Vercel

FAQs

Package last updated on 05 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts