A powerful cloud storage web application that uses Telegram as a backend storage solution via the TDS2 library. Upload, organize, and manage your files through a beautiful web interface while storing them securely in your Telegram group.
- π Web-based File Browser - Upload, download, and delete files through a modern UI
- π Folder Upload - Upload entire folders with automatic structure creation
- π Folder Organization - Create folders and organize files hierarchically
- π Move Files - Move single or multiple files between folders
- β Batch Operations - Select multiple files and move/delete them at once
- ποΈ Context Menu - Right-click on files/folders for quick actions
- π¦ Multiple File Upload - Upload multiple files simultaneously with progress tracking
- π Folder Structure Preservation - Upload folders and maintain their complete structure
- π― Drag & Drop - Easy file uploads by dragging files into the upload area
- π Per-file Progress - Individual progress bars for each uploading file
- πΎ Smart Storage - Files temporarily stored on server, then uploaded to Telegram and auto-cleaned
- π Search Functionality - Quickly find files by name across all folders
- π File Details Modal - View comprehensive file metadata (size, date, type)
- π¨ Modern UI - Beautiful, responsive design with gradient backgrounds
- β‘ Rate Limiting - Built-in 10 GB/hour upload limit to prevent Telegram bans
- π Statistics Dashboard - Real-time tracking of storage usage and rate limit consumption
β οΈ Rate Limit Warning - Visual indicator when approaching upload limits- π Safe Deletion - Confirmation prompts before deleting files/folders
- Python 3.8 or higher
- Telegram API credentials (API ID and API Hash)
- A Telegram group for file storage
- Clone the repository:
git clone <repository-url>
cd OrbitDrive- Install dependencies:
pip install -r requirements.txt- Configure your Telegram credentials:
Edit config.py and set your credentials:
API_ID = 'YOUR_API_ID'
API_HASH = 'YOUR_API_HASH'
GROUP_CHAT_ID = 'YOUR_GROUP_CHAT_ID'To get these credentials:
- Visit https://my.telegram.org
- Login with your phone number
- Go to "API development tools"
- Create an application to get your API_ID and API_HASH
- Create a Telegram group and get its chat ID (use a bot like @userinfobot)
- Start the server:
python backend.py- Access the web interface: Open your browser and navigate to:
http://localhost:8000
- First run: On the first run, you'll need to authenticate with Telegram. Check the terminal for authentication prompts.
Single/Multiple Files:
- Click the "β¬οΈ Upload File" button
- Select one or multiple files
- Each file shows individual progress
- Files appear in your current folder when complete
Upload Entire Folders:
- Click the "π Upload Folder" button
- Select a folder from your computer
- The app automatically:
- Creates the folder structure
- Uploads all files to correct locations
- Shows progress for each file with full path
Drag & Drop:
- Simply drag files into the upload area
- Multiple files supported
- Click the "π New Folder" button
- Enter a folder name
- Click "Create"
- The new folder appears in your current location
Move Single File:
- Right-click on a file
- Select "Move" from the context menu
- Choose destination folder from the tree
- Click "Move"
Move Multiple Files:
- Check the checkbox on each file you want to move
- A toolbar appears at the bottom showing selection count
- Click "Move" button in the toolbar
- Select destination folder
- Click "Move" to confirm
-
Click on a file to view details
-
Click "β¬οΈ Download" button in the modal
OR
-
Right-click on a file
-
Select "Download" from the context menu
Single Item:
- Right-click on a file or folder
- Select "Delete" from the context menu
- Confirm the deletion
Multiple Files:
- Select files using checkboxes
- Click "Delete" button in the toolbar
- Confirm deletion
Note: Deleting a folder removes all files and subfolders inside it.
- Type in the search box at the top
- Results appear automatically as you type
- Search works across all folders
- Clear search to return to folder view
- Click on any file
- A modal shows:
- File icon based on type
- Original filename
- File size (formatted)
- Upload date and time
- Mime type
- Download or delete from the modal
OrbitDrive/
βββ start.py # Quick start script with validation
βββ backend.py # FastAPI server and API endpoints
βββ config.py # Configuration settings (EDIT THIS!)
βββ database.py # SQLite database models and operations
βββ tds_service.py # TDS2 wrapper for Telegram operations
βββ tds_service.py # TDS2 wrapper service
βββ requirements.txt # Python dependencies
βββ main.py # Test script for TDS2
βββ static/
β βββ index.html # Frontend HTML
β βββ app.js # Frontend JavaScript
βββ uploads/ # Temporary upload directory (auto-created)
βββ sessions/ # Telegram session files (auto-created)
βββ orbitdrive.db # SQLite database (auto-created)
βββ tds2_files.json # TDS2 log file (auto-created)
- Change the SECRET_KEY in
config.pyfor production use - Use environment variables for sensitive credentials instead of hardcoding them
- Enable authentication if deploying publicly
- Use HTTPS in production
- Set appropriate CORS origins in production
Edit config.py to customize:
MAX_UPLOAD_SIZE_MB- Maximum file size (default: 2000 MB)RATE_LIMIT_GB_PER_HOUR- Upload rate limit (default: 10 GB)HOST- Server host (default: 0.0.0.0)PORT- Server port (default: 8000)ALLOWED_FILE_EXTENSIONS- Allowed file types
folders
- id (PRIMARY KEY)
- name (TEXT)
- parent_id (FOREIGN KEY)
- path (TEXT UNIQUE)
- created_at (TIMESTAMP)
files
- id (PRIMARY KEY)
- filename (TEXT)
- original_filename (TEXT)
- folder_id (FOREIGN KEY)
- message_id (INTEGER) - Telegram message ID
- file_size (INTEGER)
- mime_type (TEXT)
- uploaded_at (TIMESTAMP)
- is_deleted (BOOLEAN)
upload_tracking
- id (PRIMARY KEY)
- upload_size (INTEGER)
- upload_timestamp (TIMESTAMP)
GET /api/stats- Get overall statistics
POST /api/folders- Create a new folderGET /api/folders- List foldersGET /api/folders/{id}- Get folder detailsDELETE /api/folders/{id}- Delete folder
POST /api/files/upload- Upload a fileGET /api/files?folder_id={id}- List files in folderGET /api/files/search?q={query}- Search filesGET /api/files/{id}- Get file infoGET /api/files/{id}/download- Download fileDELETE /api/files/{id}- Delete file
POST /api/maintenance/cleanup-tracking- Clean old upload tracking records
- Verify your API credentials are correct
- Check your internet connection
- Ensure the Telegram group exists and you have access
- Wait for the hourly rate limit to reset
- Check current usage in the dashboard
- Old upload tracking records are cleaned up automatically after 7 days
- Delete the session files in the
sessions/directory - Restart the server and authenticate again
This project is open source and available under the MIT License.
Contributions, issues, and feature requests are welcome!
Built with β€οΈ using FastAPI, TDS2, and modern web technologies.
- TDS2 - Telegram as cloud storage library
- FastAPI - Modern Python web framework
- Telegram - For providing the platform