This workflow helps you upload a screenshot from your clipboard or local disk to Cloudflare R2 and puts the public URL of the image to your clipboard.
This workflow is written in Python. It uses Boto3 as the AWS client to upload images.
demo-upload-workflow.mp4
https://github.com/PatelUtkarsh/Alfred-Workflow-Upload-R2/releases
Check https://www.cloudflare.com/developer-platform/r2/ on how to get environment variables.
Config Environment Variables:
- cf_access_key: Cloudflare access key
- cf_account_id: Cloudflare access secret
- cf_secret_key: Cloudflare access secret
- cf_bucket_name: Cloudflare bucket name. e.g.
my-bucket-name
- cf_region: Cloudflare region (Must be one of: wnam, enam, weur, eeur, apac, auto).
- tinypng_api_key: Get your tinypng API key from https://tinypng.com/developers to compress images before uploading.
- shorturl: If you have proxy to bucket via CloudFlare use that url.
Upload image from clipboard:
upload
Upload image from local:
upload TYPE-FILENAME-HERE
Upload clipboard text file:
pb