8e6ccf211081ef674b692e6d792c2a7e200f04cc
- Virtual-hosted bucket detection from Host header (extractS3BucketFromHost) - S3 CORS headers + OPTIONS preflight + x-amz-id-2/HostId everywhere - Presigned GET/PUT/HEAD/DELETE via centralized auth (no GET-only restriction) - ListMultipartUploads with DB/xml helpers - UploadPart partNumber range validation (1-10000) - CompleteMultipartUpload ETag matching and ascending order validation - DeleteObjects quiet mode support - CopyObject URL-decode and conditional if-match/if-none-match - encoding-type=url support in ListObjects V1/V2 XML - Safe range-based prefix matching (replaces SQL LIKE) - STREAMING-AWS4-HMAC-SHA256-PAYLOAD → 501 NotImplemented - Traefik wildcard HostRegex for virtual-hosted style - S3_VHOST_DOMAINS config env var
Telegram Bot Uploader Backend
Backend production-ready untuk upload file ke Telegram yang tersimpan di private channel.
Setup
- Install PostgreSQL database
- Buat database:
createdb telegram_uploader - Setup environment:
cp .env.example .env - Edit
.envdengan nilai yang sesuai - Create table:
bun run db:migrate - Install dependencies:
bun install
Telegram Private Channel Setup
- Buat private channel Telegram
- Tambah bot sebagai admin di channel
- Dapatkan
STORAGE_CHANNEL_ID(misalnya -1001234567890)
Running
bun run dev # Development mode
bun run start # Production mode
API Endpoints
POST /api/upload- Upload fileGET /f/:public_id- Download redirectGET /file/:public_id/info- File metadataGET /health- Health check
FAQ
URL permanen maksudnya apa?
URL backend tetap permanen: https://tele.asepharyana.my.id/f/{public_id}
Ini berarti URL service Anda fix, bukan jaminan file Telegram abadi.
Testing
Gunakan bot Telegram untuk upload, atau upload API langsung via HTTP.
Languages
TypeScript
89.5%
HTML
8%
Shell
1.8%
Nix
0.5%
Dockerfile
0.2%