I wrote this on a Friday evening to replace CleanShot X's cloud upload feature. It's a simple upload handler and a web server that serves the uploaded files.
It deploys to Cloudflare Workers and uses R2 for storage.
There's a Siri Shortcut that uploads the last screenshot to the server.
I added a button that deploys the project to Cloudflare Workers. You can use it to deploy your own instance of cloudwrap.
-
Sign up to Cloudflare & create an R2 bucket named
cloudwrap
. -
Click the button below to deploy the project to Cloudflare Workers.
-
Navigate to the Workers dashboard and add the following environment variables as a secret:
SHARED_SECRET
- Choose a secret key that will be used to authenticate requests.
-
(Optionally) Setup a custom domain for your Worker.
-
Click the link below to download the Siri Shortcut.
-
Set the Endpoint URL variable to the URL of your Worker
-
Set the Secret variable to the secret key you chose earlier
-
(Optionally) Make it accessible
- On macOS select "Finder" under "Use as Quick Action"
- On macOS select "Show in Share Sheet"
-
Clone the repository
git clone https://github.com/willhackett/cloudwrap.git
-
Install the dependencies
npm install
-
Deploy the project to Cloudflare Workers
wrangler deploy
-
Follow secret setup instructions from the Cloudflare Workers deployment section
The template is located in public/template.html
. You can customise it to your liking.