mirror of
https://github.com/syumai/workers.git
synced 2025-03-11 01:39:11 +00:00
update README
This commit is contained in:
parent
23bf82af32
commit
8a4821d60b
@ -1,14 +1,26 @@
|
|||||||
# r2-image-server
|
# r2-image-server
|
||||||
|
|
||||||
* An example server which returns image from Cloudflare R2.
|
* An example server of R2.
|
||||||
* This server is implemented in Go and compiled with tinygo.
|
* This server can store / load / delete images in R2.
|
||||||
|
|
||||||
## Example
|
## Usage
|
||||||
|
|
||||||
* https://r2-image-server.syumai.workers.dev/syumai.png
|
### Endpoints
|
||||||
|
|
||||||
|
* **GET `/images/{key}`**
|
||||||
|
- Get an image object at the `key` and returns it.
|
||||||
|
* **PUT `/images/{key}`**
|
||||||
|
- Create an image object at the `key` and uploads image.
|
||||||
|
- Request body must be binary and request header must have `Content-Type`.
|
||||||
|
* **DELETE `/images/{key}`**
|
||||||
|
- Delete an image object at the `key`.
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
|
* See the following documents for details on how to use R2.
|
||||||
|
- https://developers.cloudflare.com/r2/runtime-apis
|
||||||
|
- https://pkg.go.dev/github.com/syumai/workers
|
||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
This project requires these tools to be installed globally.
|
This project requires these tools to be installed globally.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user