G2 Storage is an S3-compatible API. Use any S3 SDK or tool!
Configure any S3 client to use G2 Storage by pointing to our endpoint with your bucket credentials.
// JavaScript/Node.js Example
import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3";
const client = new S3Client({
endpoint: "https://g2-backend.fikri-afa289.workers.dev/g2",
region: "auto",
credentials: {
accessKeyId: "YOUR_ACCESS_KEY",
secretAccessKey: "YOUR_SECRET_KEY",
},
forcePathStyle: true,
});
// Upload a file
await client.send(new PutObjectCommand({
Bucket: "your-bucket",
Key: "hello.txt",
Body: "Hello, World!",
}));Since G2 Storage is S3-compatible, you can use any existing AWS S3 documentation and tools.
20 MB per file (Telegram limit)
Unlimited (Telegram infrastructure)
Telegram API rate limits apply
Unlimited buckets per account