Awesome Open Source
Awesome Open Source

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=<your_access_key_here> -e OTAKU_STORAGE=<storage_name_here> 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
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Firebase (20,824
Elixir (16,566
Upload (14,330
Jwt (9,735
Cdn (4,155
Multipart (1,103
Image Uploader (172
Bunnycdn (17