osamstorage
v1.0.9
Published
A seamless chunked upload SDK for React and React Native
Readme
📦 OsamStorage SDK
Upload, process, and serve media — with just one line of code.
OsamStorage is a powerful file upload SDK for React, Next.js, and React Native.
We don’t just store your files — we optimize, process, and deliver them automatically.
👉 Buy storage / get token: https://osamtech.com/storage/pricing
👉 Full documentation: https://osamtech.com/storage/docs
✨ Why OsamStorage?
Most storage solutions are just buckets.
OsamStorage is a processing engine + storage API.
⚡ Automatic Processing
- 🎥 Videos → Converted to HLS (.m3u8) at 720p
- 🖼️ Images → Converted to WebP (70% optimized)
- 📄 PDFs → Stored securely
- 📧 Email Alerts → Notification after every upload
🚫 Supported formats only: Video, Image, PDF
💳 Pricing
- ₹10 INR / GB / month
- No dashboard — API-first system
- Simple, scalable pricing
👉 Get started: https://osamtech.com/storage/pricing
🚀 Installation
npm install osamstorageReact Native (Extra Step)
npm install expo-file-system⚙️ How It Works
Using OsamStorage is just 2 steps:
- Initialize SDK with your token API
- Call
.upload()
That’s it. No chunking, no config, no headache.
🌐 Usage — React / Next.js
import { useState } from "react";
import { OsamStorage } from "osamstorage/web";
const storage = new OsamStorage({
getToken: async () => {
const res = await fetch("https://your-backend.com/api/get-token");
const data = await res.json();
return data.token;
},
});
export default function UploadPage() {
const [progress, setProgress] = useState(0);
const [status, setStatus] = useState("Idle");
const handleFileChange = async (e) => {
const file = e.target.files[0];
if (!file) return;
setStatus("Uploading...");
await storage.upload(file, {
onProgress: setProgress,
onSuccess: () => setStatus("Processing..."),
onError: () => setStatus("Failed"),
});
};
return (
<div>
<input
type="file"
accept="video/*,image/*,application/pdf"
onChange={handleFileChange}
/>
<p>{status}</p>
<p>{progress}%</p>
</div>
);
}📱 Usage — React Native
import { OsamStorage } from "osamstorage/native";
import * as DocumentPicker from "expo-document-picker";
const storage = new OsamStorage({
getToken: async () => {
const res = await fetch("https://your-backend.com/api/get-token");
const data = await res.json();
return data.token;
},
});
const uploadFile = async () => {
const result = await DocumentPicker.getDocumentAsync();
if (result.canceled) return;
await storage.upload(result.assets[0].uri, {
onProgress: console.log,
onSuccess: console.log,
onError: console.error,
});
};🗂️ File Management
Uploading is handled via SDK.
For advanced operations use REST API:
- Delete files
- Fetch media
- Check storage usage
👉 API Docs: https://osamtech.com/storage/docs
💡 Why Developers Love It
- No chunking logic needed
- No backend processing required
- No CDN setup
- Works out of the box
Just upload → we handle the rest
⚠️ Important
- No dashboard (API-first product)
- Token required for all uploads
- Only supports:
- Videos
- Images
- PDFs
🔥 Pro Tip
You don’t need to write:
- Chunk upload logic
- File compression
- Video streaming setup
👉 storage.upload() does everything automatically.
