langningchen / FileShare

Share files using Cloudflare Workers and GitHub Private Repositories!
GNU General Public License v3.0
7 stars 1 forks source link
cloudflare-workers collaborate filesharing private-repository

FileShare

Introduction

Share files using Cloudflare Workers and GitHub Private Repositories!

Usage

  1. Clone this repository
  2. Create a new GitHub Personal Access Token with the repo scope
  3. Create a private repository to store your files
  4. Make sure you have npm and wrangler installed and configured
  5. Create a new D1 Database by running wrangler d1 create file-share-data
  6. Update file wrangler.toml:
name = "file-share"
main = "Source/index.ts"
compatibility_date = "2023-10-02"

[[d1_databases]]
binding = "FileShareBufferDatabase"
database_name = "file-share-data"
database_id = "..." // The ID of the database you created, output in step 5
  1. Run npm install to install dependencies
  2. Run wrangler deploy to publish your project
  3. Run wrangler secret put GithubPAT, wrangler secret put GithubOwner and wrangler secret put GithubRepo to store your GitHub Personal Access Token, GitHub Owner and GitHub Repository
  4. Your file share is now live! 🎉

License

This project is licensed under the terms of the GNU General Public License v3.0.