https://github.com/xetera/otaku
📷 Firebase JWT based image upload server for Bunny CDN
https://github.com/xetera/otaku
bunny-cdn elixir image-uploader jwt
Last synced: 8 months ago
JSON representation
📷 Firebase JWT based image upload server for Bunny CDN
- Host: GitHub
- URL: https://github.com/xetera/otaku
- Owner: Xetera
- Created: 2019-01-14T11:18:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-14T21:48:45.000Z (over 7 years ago)
- Last Synced: 2025-04-14T08:57:11.796Z (about 1 year ago)
- Topics: bunny-cdn, elixir, image-uploader, jwt
- Language: Elixir
- Homepage:
- Size: 15.6 KB
- Stars: 7
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Otaku
A simple jwt based image upload server that works off bunny CDN

## Building for development
1. `mix deps.get`
2. `iex -S mix`
## Building for production
1. `docker build otaku .`
2. `docker run -it -p 4000:4000 --name otaku -e OTAKU_ACCESS_KEY= -e OTAKU_STORAGE= otaku`
### Processing requests
**POST** /upload
* **Headers**
* Authorization="Bearer $YOUR_GOOGLE_SIGNED_JWT"
* Content-Type="multipart/form-data"
* **Form-Data**
* image: file binary
* **Response**: { "url": "$OTAKU_CDN_URL/$USER_ID/$IMAGE_NAME" }
### Todo
- [ ] Rate limiting
- [ ] Role checks using jwt claims
- [ ] Separate endpoints that accepts API keys for pre-approved users using ShareX and the like