A Simple Cloudflare worker to upload image to Cloudflare R2 with PicGo API.
(Fork or) Clone this repo, and set the secrets first:
TOKEN
: access token for your workerupload
api:https://example.com/upload?key=${TOKEN}
delete
api:https://example.com/delete?key=${TOKEN}
BUCKET_URL
: the url of your Cloudflare R2 bucket
npx wrangler secret put TOKEN
npx wrangler secret put BUCKET_URL
Then, you can deploy the worker:
npm run deploy