PackagesStorage Providers
Storage Providers
Pluggable file upload backends for product images and merchant assets — Vercel Blob and S3-compatible storage.
Prood uploads are handled by the StorageProvider interface from @prood/types. The active provider is selected with STORAGE_PROVIDER and all uploads go through @prood/commerce tenant helpers.
Selection
| Provider | Env value | Best for |
|---|---|---|
| Vercel Blob | vercel-blob (default) | Vercel deployments, zero-config CDN |
| S3-compatible | s3 | AWS S3, Cloudflare R2, MinIO |
Tenant namespacing
Every upload uses tenant-prefixed keys so merchants cannot collide with each other:
import { uploadForTenant } from '@prood/commerce'
await uploadForTenant(orgId, {
file: buffer,
filename: 'hero.jpg',
contentType: 'image/jpeg',
directory: `products/${productId}`,
})
// key: org/{orgId}/products/{productId}/...Configuration
Set in root .env.local (see Environment variables):
STORAGE_PROVIDER—vercel-blobors3- Provider-specific credentials (
BLOB_READ_WRITE_TOKENorS3_*vars)