Use Cloudflare Workers to provide a WebDav interface for Cloudflare R2.
Go to file
2023-12-18 14:34:48 +08:00
src Refactor handle_delete and handle_mkcol functions 2023-12-18 14:34:48 +08:00
.editorconfig Initial commit 2023-11-27 13:46:18 +08:00
.gitignore Initial commit 2023-11-27 13:46:18 +08:00
.prettierrc Initial commit 2023-11-27 13:46:18 +08:00
package-lock.json Update @cloudflare/workers-types version 2023-12-06 09:42:54 +08:00
package.json Update @cloudflare/workers-types version 2023-12-06 09:42:54 +08:00
README.md Initial commit 2023-11-27 13:46:18 +08:00
tsconfig.json Initial commit 2023-11-27 13:46:18 +08:00
wrangler.toml Update dependencies 2023-11-28 23:53:02 +08:00

r2-webdav

Deploy to Cloudflare Workers

Use Cloudflare Workers to provide a WebDav interface for Cloudflare R2.

Configuration

Change wrangler.toml to your own.

[[r2_buckets]]
binding = 'webdav' # <~ valid JavaScript variable name, don't change this
bucket_name = 'webdav'

[vars]
USERNAME = "USERNAME"
PASSWORD = "PASSWORD"
  • USERNAME: The username of WebDav.
  • PASSWORD: The password of WebDav.

Development

With wrangler, you can build, test, and deploy your Worker with the following commands:

# run your Worker in an ideal development workflow (with a local server, file watcher & more)
$ npm run dev

# deploy your Worker globally to the Cloudflare network (update your wrangler.toml file for configuration)
$ npm run deploy

Read the latest worker crate documentation here: https://docs.rs/worker