@rivium/storage-react-native
v0.1.0
Published
Official React Native SDK for RiviumStorage - File storage and image transformation service
Downloads
93
Maintainers
Readme
Installation
npm install @rivium-storage/react-nativeQuick Start
import { RiviumStorage } from '@rivium-storage/react-native';
// Initialize
const storage = new RiviumStorage({ apiKey: 'YOUR_API_KEY' });
// Upload a file
const file = await storage.upload('my-bucket-id', 'images/photo.jpg', imageData, {
contentType: 'image/jpeg',
});
console.log('Uploaded:', file.url ?? file.id);
// Download a file
const data = await storage.download(file.id);
// Generate a transform URL (200x200 WebP thumbnail)
const url = storage.getTransformUrl(file.id, {
width: 200,
height: 200,
format: 'webp',
});
// Delete a file
await storage.delete(file.id);Features
- File Upload & Download — Upload from string, Uint8Array, or base64 with metadata
- Bucket Management — List, get by ID or name
- URL Generation — Public URLs, download URLs, and transform URLs
- Image Transformations — Resize, crop, format conversion, blur, sharpen, rotate
- Policy Enforcement — User-scoped access control via
userId - TypeScript First — Full type definitions included
- Zero Dependencies — Pure fetch-based, works on iOS and Android
Documentation
For full documentation, visit rivium.co/docs.
License
MIT License — see LICENSE for details.
