2022-05-29 22:07:41 +09:00
..
2022-05-29 09:17:07 +09:00
2022-05-29 09:17:07 +09:00
2022-05-29 22:07:41 +09:00
2022-05-29 09:30:15 +09:00
2022-05-29 22:07:05 +09:00
2022-05-29 09:17:07 +09:00

r2-image-server

  • An example server of R2.
  • This server can store / load / delete images in R2.

Usage

Endpoints

  • GET /images/{key}
    • Get an image object at the key and returns it.
  • POST /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

Requirements

This project requires these tools to be installed globally.

  • wrangler
  • tinygo

Commands

make dev     # run dev server
make build   # build Go Wasm binary
make publish # publish worker

Author

syumai

License

MIT