G2 Storage provides a core/common AWS S3-compatible API.
Configure an S3 client with an account-level key for bucket operations or a bucket key for object operations.
// JavaScript/Node.js Example
import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3";
const client = new S3Client({
endpoint: "https://g2-api.fkr.web.id/s3",
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!",
}));The supported surface includes SigV4, presigned URLs, bucket/object CRUD, ListObjects v1/v2, metadata, ACL, CORS, tags, range requests, copy, batch delete, and multipart uploads.
20 MB per object (Telegram backend limit)
Unlimited (Telegram infrastructure)
Telegram API rate limits apply
Unlimited buckets per account