CarpoSDK docs
Storage

Storage

Work with objects in a Carpo bucket using user policies and signed transfers.

The browser Storage client is scoped to one project, environment, and bucket. Carpo checks the bucket policy for each list, read, write, delete, copy, move, and recovery operation. Object bytes move directly between the browser and R2 using short lived signed URLs.

Create the client through createCarpoClient with storageBucketId, or create a standalone client when you access multiple buckets:

import { createCarpoStorageClient } from '@carpodev/carpo-sdk/storage'

const storage = createCarpoStorageClient({
  apiUrl: 'https://api.carpo.dev',
  projectId: 'your-project-id',
  bucketId: 'your-bucket-id',
  environment: 'production',
})

The bucket must be ready and have a policy configured in Carpo. See Project setup for policy and CORS requirements.

Guides

storage.getUsage() and server keys are not available on this browser client. See Server Storage for privileged usage details.

On this page