Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/osanj/go-image-storage
https://github.com/osanj/go-image-storage
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/osanj/go-image-storage
- Owner: osanj
- Created: 2021-07-13T20:22:52.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-15T02:40:17.000Z (over 3 years ago)
- Last Synced: 2024-10-12T00:34:43.184Z (2 months ago)
- Language: Go
- Size: 268 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-image-storage
Simple image storage service. Can be configured to store images on disk or in memory (for testing).
User management and authentication is not implemented.Run with `go run main.go `, e.g. `go run main.go config/prod.json 8080`
Test with `go test -v`
## API
### Endpoints
```
POST /api/v1/upload
GET /api/v1/item/:id
GET /api/v1/list
```### Example
```bash
curl -X POST -H "Content-Type: image/jpeg" --data-binary @testdata/beaver1.jpg http://localhost:8080/api/v1/upload
curl http://localhost:8080/api/v1/list
curl http://localhost:8080/api/v1/item/1 -o img.jpeg && eog img.jpeg
```