Skip to content

DropshareApp/cf-dropshare

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cf-dropshare

A Cloudflare Workers-based file upload service compatible with Dropshare's Custom API connection.

Deploy your own private file hosting with R2 storage.

Deploy to Cloudflare

Features

  • Fast file uploads via Cloudflare Workers
  • R2 storage (low-cost, S3-compatible)
  • API key authentication
  • Open Graph previews for shared links
  • Custom branding (site name, logo)

Configuration

Required

Binding Type Description
API_KEY Secret API key for authenticating upload requests
FILES_BUCKET R2 Bucket R2 bucket for storing uploaded files

Optional (have defaults)

Variable Default Description
SITE_NAME "Dropshare" Name shown in previews
BRAND_LOGO_URL (empty) URL to logo for Open Graph images

Dropshare Client Setup

After deploying, configure Dropshare using Custom API connection:

  1. Open Dropshare preferences
  2. Add new connection > Custom API
  3. Configure:
    • Upload URL: https://your-worker.workers.dev/upload
    • Method: POST
    • Form field name: file
    • Headers: {"Authorization": "Bearer your-api-key"} (or use X-API-Key header)
    • URL path in response: %url%
    • Delete URL (optional): %deleteUrl%

See Dropshare Custom API documentation for details.

API Reference

Upload File

POST /upload
Authorization: Bearer <API_KEY>
Content-Type: multipart/form-data

Form field: file

Response:

{
  "success": true,
  "url": "https://your-worker.workers.dev/f/<id>/<filename>",
  "deleteUrl": "https://your-worker.workers.dev/f/<id>/<filename>",
  "filename": "example.png",
  "id": "abc12345"
}

Development

pnpm install
pnpm run dev

Deploy

pnpm run deploy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 100.0%