Upload any files to Cloudflare R2 storage service with optional AVIF conversion for images.
For issues or questions regarding this extension, please contact:
- Email:
mazaoshe@hotmail.com - GitHub: https://github.com/mazaoshe/Raycast-UploadImageR2
This extension supports uploading all file types to Cloudflare R2. Here are the main categories:
- JPEG/JPG, PNG, GIF, AVIF, SVG, ICO, TIFF, BMP, PSD
- PDF, TXT, JSON, XML, CSV, RTF, Markdown (MD)
- HTML, CSS, JavaScript
- Microsoft Office: DOC, DOCX, XLS, XLSX, PPT, PPTX
- ZIP, TAR, GZ
- Audio: MP3
- Video: MP4, MOV, AVI, WMV, MKV
- WOFF, WOFF2, TTF, EOT, OTF
Note: Cloudflare R2 supports all file types as it's an object storage service that can store any binary data.
- Upload any files to Cloudflare R2 storage service
- Optionally convert images to AVIF format to reduce file size
- Support custom filename formats
- Automatically generate Markdown links and copy to clipboard
- After upload, the link is automatically copied to clipboard for easy pasting
- Cloudflare R2 Bucket
- Cloudflare API Access Keys
If image conversion is enabled, you need to install the conversion tools:
For AVIF conversion:
brew install libavif- R2 Bucket Name - Your Cloudflare R2 bucket name
- R2 Access Key ID - Your Cloudflare R2 access key ID
- R2 Secret Access Key - Your Cloudflare R2 secret access key
- R2 Account ID - Your Cloudflare account ID (the part before .r2.cloudflarestorage.com in your R2 URL)
- Custom Domain (optional) - Custom domain for accessing files
- File Name Format (optional) - Custom filename format
- Convert to AVIF - Convert images to AVIF format before uploading
- AVIF Quality - Quality setting for AVIF conversion (0-100, default: 80)
- AVIF Encoder Path (optional) - Path to avifenc command (default:
/opt/homebrew/bin/avifenc) - Generate Markdown - Generate Markdown formatted links instead of plain URLs
- Uses
avifenctool from libavif package - Provides superior compression compared to JPEG
- Requires external tool installation
- Quality setting: 0-100 (default: 80)
Supported variables:
{name}- Original filename (without extension){ext}- File extension (without dot){year}- Four-digit year{month}- Two-digit month (01-12){day}- Two-digit day (01-31){hours}- Two-digit hour (00-23){minutes}- Two-digit minute (00-59){seconds}- Two-digit second (00-59)
Example formats:
{name}_{year}{month}{day}_{hours}{minutes}{seconds}.{ext}→ Result:document_20250815_143022.pdffile_{year}-{month}-{day}.{ext}→ Result:file_2025-08-15.txt
- Install the extension from Raycast Store
- Open Raycast Preferences > Extensions > Cloudflare R2 File Uploader
- Configure your Cloudflare R2 credentials:
- R2 Bucket Name
- R2 Access Key ID
- R2 Secret Access Key
- R2 Account ID (the part before .r2.cloudflarestorage.com in your R2 URL)
- (Optional) Install conversion tools:
- For AVIF:
brew install libavif
- For AVIF:
- (Optional) Configure additional settings:
- Custom Domain
- File Name Format
- Convert to AVIF
- Quality settings for conversions
- Encoder paths (if different from default)
- Generate Markdown (disabled by default)
- Select any file in Finder
- Open Raycast (Cmd + Space) and search for "Upload File to R2"
- Press Enter to execute the command
- The extension will:
- (If enabled and file is an image) Convert the image to AVIF format
- Upload the file to your R2 bucket
- Generate a link (Markdown or plain URL)
- Copy the link to your clipboard
- Paste the link anywhere you need it
If you encounter a "conversion tool not found" error:
- Ensure the required tool is installed:
- For AVIF:
brew install libavif
- For AVIF:
- Check that the encoder path setting points to the correct command
- Run
which avifencin terminal to find the correct path
If the upload fails:
- Check your Cloudflare R2 credentials in extension preferences
- Verify your internet connection
- Check that your R2 bucket exists and is accessible
- Review the Raycast console logs for detailed error information