File Hosting and URL Shortener via LINE Chatbot
Upload a file to chatbot -> Got yourself a shorten URL!!

Tim Jinna
TL;DR
Picture this: You’re in a university classroom, preparing for a presentation, and you need to access a PowerPoint file. The traditional process involves logging into Google Drive (entering your email, password, and 2FA), downloading the file, and finally opening it. What if I told you there’s a simpler way?
I’ve created a URL shortener that allows you to upload a file to a chatbot, and voila, you get a shortened URL.
How does it work?
- Add friend with LINE chatbot
- Send file into chat
- LINE webhook trigger Golang backend API endpoint
- Backend receieved webhook
- Download file into variable
[]bytes
- Upload to S3, Generate URL with unique access token
https://firebasestorage.googleapis.com/v0/b/....jpeg?alt=media&token=9999999a-aaaa-aaaa-aaaa-9999999a
- Generate shorten URL
- Store shortenURL, filename under sender
userId
- Send message back to sender using reply token
- Download file into variable
1.Send a file or picture | 2.Upload via UI |
---|---|
Technologies Used in This Project
- Next.js - Deployed on Vercel https://liff.cjtim.com
- LINE Frontend Framework - Allowed Login seemlessly inside LINE application Docs
- Golang - GitHub Repository
- MongoDB - Used for mapping LINE user IDs and storing URLs
- Rebrandly - Provider for URL shortening
- Google Cloud Storage (S3 bucket) - Used for storing images and videos provided by users
- Cloudflare - Manages the domain server
- Kubernetes - Deployment platform
- GitLab CI - Containerize, Push to container registry, and deploy to k8s.
#urlshorten
#s3
#learning in public