Skip to content

mineclover/fileopener-redirect-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fileopener Redirect Worker

Cloudflare Worker that redirects HTTP URLs to fileopener:// protocol.

URL Format Conversion

Before: <domain.url>/fileopener/<projectName>/src/readme.md After: fileopener://<projectName>/src/readme.md

Setup

  1. Install dependencies:
npm install
  1. Update your domain in wrangler.toml:
[[routes]]
pattern = "your-domain.com/fileopener/*"
zone_name = "your-domain.com"
  1. Deploy to Cloudflare:
npm run deploy

Development

# Local development
npm run dev

# Preview deployment
npm run preview

# View logs
npm run tail

Usage

Visit: https://your-domain.com/fileopener/myProject/src/readme.md

The worker will redirect to: fileopener://myProject/src/readme.md

Features

  • Automatic protocol conversion
  • HTML fallback with manual link
  • Error handling for invalid URLs
  • Cross-browser compatibility

About

Cloudflare Worker that redirects HTTP URLs to fileopener:// protocol for seamless file opening

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •