Skip to content

🍕 Peer-to-peer file transfers in your browser

License

Notifications You must be signed in to change notification settings

guanghuang/filepizza

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo is a fork of FilePizza with the following changes:

  • Added a code input to retrieve the file

After the file is uploaded, the code is displayed on the screen. code

On the home page, the user can enter the code to retrieve the file. code

simple docker cmd to run filepizza:

docker run -d --name filepizza -p 8080:8080 -e PORT=8080 -v /media/docker/anisette/data:/home/Alcoholic/.config/anisette-v3/lib/ guang1/filepizza:latest

or using docker compose:

services:
    filepizza:
        container_name: filepizza
        volumes:
            - /media/docker/anisette/data:/home/Alcoholic/.config/anisette-v3/lib/
        ports:
            - 8080:8080
        environment:
            - PORT=8080
        restart: always
        image: guang1/filepizza:latest
        network_mode: bridge

for advanced docker setup, see docker-compose.yml, docker-compose.prod.yml


XKCD 949 FilePizza wordmark

Peer-to-peer file transfers in your browser

Cooked up by Alex Kern & Neeraj Baid while eating Sliver @ UC Berkeley.

Using WebRTC, FilePizza eliminates the initial upload step required by other web-based file sharing services. Because data is never stored in an intermediary server, the transfer is fast, private, and secure.

A hosted instance of FilePizza is available at file.pizza.

What's new with FilePizza v2

  • A new UI with dark mode support, now built on modern browser technologies.
  • Works on most mobile browsers, including Mobile Safari.
  • Transfers are now directly from the uploader to the downloader's browser (WebRTC without WebTorrent) with faster handshakes.
  • Uploaders can monitor the progress of the transfer and stop it if they want.
  • Better security and safety measures with password protection and reporting.
  • Support for uploading multiple files at once, which downloaders receive as a zip file.
  • Streaming downloads with a Service Worker.
  • Out-of-process storage of server state using Redis.

Development

$ git clone https://github.com/kern/filepizza.git
$ pnpm install
$ pnpm dev
$ pnpm build
$ pnpm start

Running with Docker

$ pnpm docker:build
$ pnpm docker:up
$ pnpm docker:down

Stack

  • Next.js
  • Tailwind
  • TypeScript
  • React
  • PeerJS for WebRTC
  • View Transitions
  • Redis (optional)

FAQ

How are my files sent? Your files are sent directly from your browser to the downloader's browser. They never pass through our servers. FilePizza uses WebRTC to send files. This requires that the uploader leave their browser window open until the transfer is complete.

Can multiple people download my file at once? Yes! Just send them your short or long URL.

How big can my files be? As big as your browser can handle.

What happens when I close my browser? The URLs for your files will no longer work. If a downloader has completed the transfer, that downloader will continue to seed to incomplete downloaders, but no new downloads may be initiated.

Are my files encrypted? Yes, all WebRTC communications are automatically encrypted using public-key cryptography because of DTLS. You can add an optional password to your upload for an extra layer of security.

License & Acknowledgements

FilePizza is released under the BSD 3-Clause license. A huge thanks to iblowyourdesign for the pizza illustration.

About

🍕 Peer-to-peer file transfers in your browser

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 94.9%
  • JavaScript 2.3%
  • HTML 2.3%
  • Other 0.5%