https://github.com/sharpvik/ava
The microservice for storing your users' avatars (or any kind of images for that matter)
https://github.com/sharpvik/ava
Last synced: 11 months ago
JSON representation
The microservice for storing your users' avatars (or any kind of images for that matter)
- Host: GitHub
- URL: https://github.com/sharpvik/ava
- Owner: sharpvik
- License: mit
- Created: 2021-03-21T20:59:42.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-15T22:10:31.000Z (over 4 years ago)
- Last Synced: 2025-01-16T18:29:36.474Z (about 1 year ago)
- Language: Go
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ava
The microservice for storing your users' avatars (or any kind of images for that
matter).
Start it up via Docker or `docker-compose`. It will listen on port `42069`.
You could create a `.env` file where you _may or may not_ specify an
`AVA_API_KEY` variable like so:
```bash
# .env
AVA_API_KEY=mySuperSecretAPIKey
```
If you don't specify any `AVA_API_KEY` it is assumed to be `""` and any
request with a missing `Ava-API-Key` header will be authorized to proceed.
## API
```
POST /upload/jpg
```
Put your image file into the request body and enjoy. This will respond with a
simple string (e.g. `166ebdf66f4174b5.jpg`) that you'll be able to use to
retrieve the image.
```
GET /download/166ebdf66f4174b5.jpg
```
Given the string, send this request to get your image back. It will be attached
to the response body with a proper MIME type header set.