.do
Data Storage

storage

Cloud storage and file management

storage

Cloud storage for files, documents, and assets with versioning, access control, and seamless integration with CDN delivery.

Overview

The storage primitive provides S3-compatible object storage for all file types with features like versioning, metadata, access control, and automatic CDN distribution.

Quick Example

import { storage } from 'sdk.do'

// Upload file
const file = await storage.upload('./document.pdf', {
  path: '/documents/contracts/agreement.pdf',
  metadata: {
    category: 'legal',
    confidential: true,
  },
})

// Download file
const buffer = await storage.download(file.path)

// List files
const files = await storage.list('/documents', {
  recursive: true,
  filter: { extension: 'pdf' },
})

// Get public URL
const url = storage.publicUrl(file.path, {
  expires: '1h',
})

Core Capabilities

  • File Upload/Download - Store and retrieve any file type
  • Versioning - Track file versions and history
  • Access Control - Fine-grained permissions and signed URLs
  • Metadata - Custom metadata and tagging
  • CDN Integration - Automatic edge caching and delivery

Access Methods

SDK

TypeScript/JavaScript library for storage operations

await storage.upload('./document.pdf', { path: '/documents/agreement.pdf' })

SDK Documentation

CLI

Command-line tool for file management

do storage upload document.pdf --path /documents/agreement.pdf

CLI Documentation

API

REST/RPC endpoints for storage operations

API Documentation

MCP

Model Context Protocol for AI-driven storage operations

Upload document.pdf to /documents/agreement.pdf with metadata category: legal

MCP Documentation

  • images - Image storage and processing
  • videos - Video storage and streaming
  • datasets - Dataset storage