2023-04-11 22:45:19 +09:00
..
2022-05-29 09:17:07 +09:00
2022-05-29 09:17:07 +09:00
2023-02-11 12:38:46 +09:00
2022-05-29 09:30:15 +09:00
2023-04-11 22:45:19 +09:00
2023-02-11 12:38:46 +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 /{key}
    • Get an image object at the key and returns it.
  • POST /{key}
    • Create an image object at the key and uploads image.
    • Request body must be binary and request header must have Content-Type.
  • DELETE /{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