A Cloudflare Workers-based file upload service compatible with Dropshare's Custom API connection.
Deploy your own private file hosting with R2 storage.
- 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)
| Binding | Type | Description |
|---|---|---|
API_KEY |
Secret | API key for authenticating upload requests |
FILES_BUCKET |
R2 Bucket | R2 bucket for storing uploaded files |
| Variable | Default | Description |
|---|---|---|
SITE_NAME |
"Dropshare" | Name shown in previews |
BRAND_LOGO_URL |
(empty) | URL to logo for Open Graph images |
After deploying, configure Dropshare using Custom API connection:
- Open Dropshare preferences
- Add new connection > Custom API
- Configure:
- Upload URL:
https://your-worker.workers.dev/upload - Method: POST
- Form field name:
file - Headers:
{"Authorization": "Bearer your-api-key"}(or useX-API-Keyheader) - URL path in response:
%url% - Delete URL (optional):
%deleteUrl%
- Upload URL:
See Dropshare Custom API documentation for details.
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"
}pnpm install
pnpm run devpnpm run deploy