2025-01-12 22:54:47 +09:00
..
2024-01-03 00:43:21 +09:00
2023-10-22 14:30:33 +09:00
2023-04-30 12:42:20 +09:00
2025-01-12 22:54:47 +09:00
2023-04-30 12:42:20 +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 deploy # deploy worker