Permanent Links for Members
Sign in with Google to keep your important office links active indefinitely, or use Guest Mode for quick temporary 3-day shares.
Share heavy project archives, CAD drawings, and documents at full speed. Attach a custom note for your recipient and track real-time link engagement.
Drag & drop your files here
High-speed parallel stream · Instant share link ready in seconds
End-to-end encrypted transfer · Detailed download analytics included
Why T-Rex Cloud
Sign in with Google to keep your important office links active indefinitely, or use Guest Mode for quick temporary 3-day shares.
Attach instructions, revision remarks, or checklists directly to your upload so recipients see your message before downloading.
Know exactly when your link was opened, how long the recipient viewed the page, their city/device, and whether the download completed.
"Sir, isme revised Elevation CAD Drawing (Sheet-04) aur Final BOQ Excel hai. Please check karke evening meeting se pehle approval de dena."
Manage your uploaded files, edit recipient notes, and inspect detailed visitor activity.
| File & Attached Note | Size & Expiry | Share Link | Visitor Engagement | Actions |
|---|
Manage storage API credentials, channel IDs, guest retention rules, registered users, and live visitor logs.
Exact timestamp, location, device, how long the link remained open, and download completion.
| Opened At | Link / File | Location & IP | Device / Browser | Time Kept Open | Note Viewed | Download Status |
|---|
Control how many days files uploaded in Guest Mode stay active before automatic removal. Logged-in Google/Email users always get permanent links.
Manage Google OAuth and email accounts, change roles, or suspend access.
| User / Auth Method | Role | Files Shared | Status | Manage |
|---|
Update your private Telegram storage channel ID and bot tokens directly from the web dashboard without redeploying code.
Must start with -100. Ensure all bots below are Admins in this channel.
Used for automatic redundancy if enabled.
export default {
async fetch(request, env) {
const url = new URL(request.url);
// Stream Multi-Chunk File directly from Telegram Bot API to Recipient
if (url.pathname.startsWith("/stream/")) {
const slug = url.pathname.replace("/stream/", "");
const metaRes = await fetch(`${env.API_BASE_URL}/api/files/${slug}/stream-meta`, {
headers: { "X-Edge-Secret": env.EDGE_SECRET }
});
if (!metaRes.ok) return new Response("Link Expired or Invalid", { status: 404 });
const { fileName, mimeType, chunks, botTokens } = await metaRes.json();
const { readable, writable } = new TransformStream();
const writer = writable.getWriter();
(async () => {
for (let i = 0; i < chunks.length; i++) {
const token = botTokens[i % botTokens.length];
const pathRes = await fetch(`https://api.telegram.org/bot${token}/getFile?file_id=${chunks[i]}`);
const pathJson = await pathRes.json();
const tgUrl = `https://api.telegram.org/file/bot${token}/${pathJson.result.file_path}`;
const chunkRes = await fetch(tgUrl);
for await (const slice of chunkRes.body) {
await writer.write(slice);
}
}
await writer.close();
})();
return new Response(readable, {
headers: {
"Content-Type": mimeType || "application/octet-stream",
"Content-Disposition": `attachment; filename="${fileName}"`,
"Cache-Control": "private, no-transform"
}
});
}
return new Response("T-Rex Edge Network Active", { status: 200 });
}
};
from fastapi import FastAPI, Request, HTTPException, Depends
from motor.motor_asyncio import AsyncIOMotorClient
from datetime import datetime, timedelta
import os
app = FastAPI(title="T-Rex Cloud API")
mongo = AsyncIOMotorClient(os.getenv("MONGODB_URI"))
db = mongo.trex_cloud
# MongoDB TTL Index automatically deletes expired Guest files while keeping User files permanent:
# db.files.create_index("expiresAt", expireAfterSeconds=0)
@app.post("/api/files/create")
async def register_uploaded_file(payload: dict):
settings = await db.system_config.find_one({"_id": "global"}) or {"guestExpiryDays": 3}
is_guest = payload.get("role") == "guest"
expires_at = datetime.utcnow() + timedelta(days=settings["guestExpiryDays"]) if is_guest else None
doc = {
"slug": payload["slug"],
"name": payload["name"],
"size": payload["size"],
"chunks": payload["chunks"],
"note": payload.get("note", ""),
"ownerEmail": payload.get("ownerEmail", "guest"),
"isGuest": is_guest,
"createdAt": datetime.utcnow(),
"expiresAt": expires_at,
"active": True
}
await db.files.insert_one(doc)
return {"status": "ok", "slug": doc["slug"], "expiresAt": expires_at}
@app.post("/api/telemetry/heartbeat")
async def record_heartbeat(request: Request, data: dict):
city = request.headers.get("cf-ipcity", "Mumbai")
ip = request.headers.get("cf-connecting-ip", request.client.host)
await db.analytics_logs.update_one(
{"sessionId": data["sessionId"], "slug": data["slug"]},
{
"$set": {
"ip": ip,
"city": city,
"device": data.get("device"),
"noteRead": data.get("noteRead", True),
"downloadStatus": data.get("downloadStatus", "OPENED"),
"lastPingAt": datetime.utcnow()
},
"$inc": {"durationSeconds": 5},
"$setOnInsert": {"openedAt": datetime.utcnow()}
},
upsert=True
)
return {"ok": True}
@app.put("/api/admin/storage-config")
async def update_telegram_config(cfg: dict):
await db.system_config.update_one(
{"_id": "global"},
{"$set": {
"primaryChannelId": cfg["primaryChannelId"],
"backupChannelId": cfg.get("backupChannelId"),
"botTokens": cfg["botTokens"],
"guestExpiryDays": int(cfg.get("guestExpiryDays", 3))
}},
upsert=True
)
return {"updated": True}
Stream multi-gigabyte files directly between devices in real time using encrypted WebRTC channels.
Select a file and share the 6-digit pairing code with your recipient.
Enter the sender's 6-digit pairing code to begin direct transfer: