Skip to content

Xetera/otaku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

📷 Firebase JWT based image upload server for Bunny CDN

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors