@natiwo/storage
v0.1.0
Published
Storage abstraction for S3, R2, and local filesystem
Downloads
137
Readme
@natiwo/storage
S3 and filesystem storage abstraction
Installation
pnpm add @natiwo/storage @aws-sdk/client-s3Features
- ☁️ S3 Integration - AWS S3 storage
- 📁 Filesystem - Local file storage
- 🔄 Streaming - Large file support
- 🔐 Pre-signed URLs - Secure uploads/downloads
- 🎯 Type-Safe - Full TypeScript support
Quick Start
import { S3Storage, FileSystemStorage } from '@natiwo/storage';
// S3
const s3 = new S3Storage({
bucket: 'my-bucket',
region: 'us-east-1',
});
await s3.put('path/file.txt', buffer);
const file = await s3.get('path/file.txt');
await s3.delete('path/file.txt');
// Filesystem
const fs = new FileSystemStorage('/uploads');
await fs.put('file.txt', buffer);License
MIT © NATIWO Sistemas
