An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# Otaku

A simple jwt based image upload server that works off bunny CDN

![](https://pm1.narvii.com/5824/13b53b8e3e490c86d1963e9648e2bf6a949a8e0c_hq.jpg)

## 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