# filepizza

> Free peer-to-peer file transfers in your browser.

Latest version **1.1.0** (published 2019-10-22) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install filepizza
pnpm add filepizza
yarn add filepizza
bun add filepizza
```

Provides the command `filepizza`.

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score; popular repo.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-10-22 |
| First published | 2015-05-19 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 5.0.0 |
| Dependencies | 22 |
| Unpacked size | 1.4 MB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 10292 |
| Author | Alex Kern |
| Maintainers | alexkern |

## Links

- npm: https://www.npmjs.com/package/filepizza
- Repository: https://github.com/kern/filepizza
- Issues: https://github.com/kern/filepizza/issues
- npm.io page: https://npm.io/package/filepizza

## Dependencies (22)

- [alt](https://npm.io/package/alt.md) ^0.14.4
- [nib](https://npm.io/package/nib.md) ^1.1.0
- [react](https://npm.io/package/react.md) ^0.13.0
- [stylus](https://npm.io/package/stylus.md) ^0.52.4
- [twilio](https://npm.io/package/twilio.md) ^2.9.1
- [express](https://npm.io/package/express.md) ^4.12.0
- [nodemon](https://npm.io/package/nodemon.md) ^1.4.1
- [winston](https://npm.io/package/winston.md) ^1.0.1
- [newrelic](https://npm.io/package/newrelic.md) ^1.21.1
- [react-qr](https://npm.io/package/react-qr.md) 0.0.2
- [node-uuid](https://npm.io/package/node-uuid.md) ^1.4.3
- [socket.io](https://npm.io/package/socket.io.md) ^1.3.5
- [classnames](https://npm.io/package/classnames.md) ^1.2.0
- [react-router](https://npm.io/package/react-router.md) ^0.13.1
- [webrtcsupport](https://npm.io/package/webrtcsupport.md) ^2.2.0
- [xkcd-password](https://npm.io/package/xkcd-password.md) ^1.2.0
- [express-winston](https://npm.io/package/express-winston.md) ^0.3.1
- [filepizza-socket](https://npm.io/package/filepizza-socket.md) ^1.0.0
- [react-frozenhead](https://npm.io/package/react-frozenhead.md) ^0.3.0
- [socket.io-client](https://npm.io/package/socket.io-client.md) ^1.3.5
- [express-force-ssl](https://npm.io/package/express-force-ssl.md) ^0.3.1
- [react-google-analytics](https://npm.io/package/react-google-analytics.md) ^0.2.0

## Recent versions

- 1.1.0 (latest) — 2019-10-22
- 0.2.3 — 2015-09-08
- 0.2.2 — 2015-09-06
- 0.2.1 — 2015-09-06
- 0.2.0 — 2015-08-21
- 0.1.2 — 2015-06-22
- 0.1.1 — 2015-06-18
- 0.1.0 — 2015-05-19

## README

<a href="https://xkcd.com/949/"><img src="http://imgs.xkcd.com/comics/file_transfer.png" alt="XKCD 949" width="30%" align="right" /></a> <img src="src/static/images/wordmark.png" alt="FilePizza wordmark" width="50%" /> <h3>Peer-to-peer file transfers in your browser</h3>

*Cooked up by [Alex Kern](https://kern.io) & [Neeraj Baid](http://neeraj.io) while eating Sliver @ UC Berkeley.*

Using [WebRTC](http://www.webrtc.org), FilePizza eliminates the initial upload step required by other web-based file sharing services. When senders initialize a transfer, they receive a "tempalink" they can distribute to recipients. Upon visiting this link, recipients' browsers connect directly to the sender’s browser and may begin downloading the selected file. 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](https://file.pizza).

## Requirements

* node `0.12.x`
* npm `2.x.x`

## Installation

The recommended way to deploy FilePizza is as a [Docker container](https://hub.docker.com/r/kern/filepizza).

    $ docker run -p 8080:8080 -e PORT=8080 -it kern/filepizza:latest

You can also use [zeit/now](https://zeit.co/now):

    $ now --npm --public -e NODE_ENV=production

If you'd like to use [Twilio's STUN/TURN service](https://www.twilio.com/stun-turn) for better connectivity behind NATs, you can specify your SID and token using the `TWILIO_SID` and `TWILIO_TOKEN` environment variables, respectively.

If you want to use [Google Analytics](https://marketingplatform.google.com/about/analytics/), you can specify your UA code using the `GA_ACCESS_TOKEN="UA-00000000-1"` environment variable.

## Development

    $ git clone https://github.com/kern/filepizza.git
    $ npm install
    $ npm run-script build
    $ npm start

FilePizza is an isomorphic React application which uses the Flux application architecture. ES6 features are used liberally and compiled using Babel. Views are rendered on the server, store data is serialized and sent to the client, which then picks up where the server left off.

Both client and server JavaScript files can be found in `lib/`. `lib/server.js` and `lib/client.js` are the server and client entrypoints, respectively. `lib/components/`, `lib/stores/`, and `lib/actions/` contain the corresponding Flux modules, implemented using [alt](https://github.com/goatslacker/alt). `lib/routes.js` serves as the isomorphic routes file using [react-router](https://github.com/rackt/react-router).

Client-side JavaScript and CSS are compiled using webpack and are available at `/app.js`.

## FAQ

**Where are my files sent?** Your files never touch our server. Instead, they are sent directly from the uploader's browser to the downloader's browser using WebTorrent and WebRTC. 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 tempalink.

**How big can my files be?** Chrome has issues supporting files >500 MB. Firefox does not have any issues with large files, however.

**What happens when I close my browser?** The tempalink is invalidated. 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.

**My files are sending slowly!** Transfer speed is dependent on your network connection.

## Troubleshooting

If you receive a `Error: EMFILE, too many open files` error when running `npm
start` on a Mac, this is a result of Browserify's compilation step opening up a
large number of npm modules all at once. You'll have to increase the maximum
number of open files allowed on your system:

    $ sysctl -w kern.maxfiles=20480

## License & Acknowledgements

FilePizza is released under the [BSD 3-Clause license](https://github.com/kern/filepizza/blob/master/LICENSE). A huge thanks to [WebTorrent](https://github.com/feross/webtorrent) which we use for the file transfers under the hood.

---
_Source: https://npm.io/package/filepizza · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
