kern / filepizza Goto Github PK
View Code? Open in Web Editor NEW:pizza: Peer-to-peer file transfers in your browser
Home Page: https://file.pizza
License: Other
:pizza: Peer-to-peer file transfers in your browser
Home Page: https://file.pizza
License: Other
I tried to use file.pizza today with Chromium, but got this error on the console.
Could it be related to this issue?
socketio/socket.io#1942
Chrome and firefox for android can use other webrtc tools but both crash on webtorrent with a 2GB file... maybe it's trying to store the whole file in ram instead of only the chunk hashes.
It would be nice to be able to self-host the signalling, STUN & TURN server (e.g. using https://github.com/andyet/signalmaster) and be able to use it with FilePizza.
Related to #39
use crypto to add a hash at the end of your download url . This decreases chances of url collision .
I tried to send a .zip file to a friend yesterday. I distributed the file via Google Chrome on Windows 7 and he tried to download it via Mozilla Firefox and Google Chrome and it didn't load. We both had WebRTC activated.
Today I tried to upload a .txt file from my Android phone's Chrome app and download it via Mozilla Firefox on a Windows 10 computer, but that didn't load either. Both browsers had WebRTC activated.
I'm not sure what the threshold is for failed downloads, but I received this error twice today while trying to transfer a couple of zips. One was 200mb the other was 500, both times the transfer looked fine, but once the file had been delivered the download would fail with the following error message:
"The server could not find the file"
Chrome 42, OSX Yosemite
As most paths are hardcoded and begin with /
installing this project in a subdir is very difficult. #58 is part of this issue.
It would be very nice to have some configuration options to set a subdir path or to make it compatible with subdir installations out-of-the-box by using relative paths.
System:
Arch Linux
NodeJS v0.12.4
NPM 2.11.2
Installed with # npm install -g filepizza
and started with $ filepizza
Error:
$ filepizza
/usr/lib/node_modules/filepizza/lib/server.js:39
db.create(socket).then((u) => {
^^
SyntaxError: Unexpected token =>
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Module._extensions..js (module.js:478:10)
at Object.require.extensions.(anonymous function) [as .js] (/usr/lib/node_modules/filepizza/node_modules/babel/lib/babel/api/register/node.js:130:7)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/usr/lib/node_modules/filepizza/index.js:3:18)
at Module._compile (module.js:460:26)
Same problem when using iojs 2.x. Seems to be a problem with babel transpiling. iojs should support "() =>" functions out of the box but still same error.
I always get this JS error:
Error: Invariant Violation: You're trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:
(client) <html lang="en" data-react
(server) <html data-reactid=".1tf8p
And yes I have modified the JS/HTML code a bit, but I recompiled everything using make build
, so I thought it should be working.
How can I remove this checksum?
Re-Installed with npm install filepizza -g :
env PORT=3457 filepizza
module.js:338
throw err;
^
Error: Cannot find module './dist/server'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/usr/lib/node_modules/filepizza/index.js:10:18)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
There is no ./dist obviously after the install ...
If you already use such crappy URLs such as /js
or /css
you should at least send the correct Content-Type header.
Even for the index page no Content-Type header is sent.
Hello, why use your site is tight for users on Microsoft Edge?
I was looking at some of the React components and noticed that the "componentDidUnmount" function was being used to unbind event listeners. However, this it not a valid function in the React lifecycle and is never called. The correct function is "componentWillUnmount".
Here is one such example, but I feel as if there are more.
https://github.com/kern/filepizza/blob/master/lib/components/ChromeNotice.js
After loading the page locally at 127.0.0.1:3000 in Chrome and OSX, I get the following crash
runtime output:
> [email protected] start /Users/aidan/Desktop/filepizza/filepizza
> node index.js
WebDrop listening on 0.0.0.0:3000
�[0mGET / �[32m200 �[0m33.501 ms - -�[0m
�[0mGET /images/up.png �[36m304 �[0m3.306 ms - -�[0m
�[0mGET /images/pizza.png �[36m304 �[0m0.925 ms - -�[0m
�[0mGET /css �[32m200 �[0m290.000 ms - 6556�[0m
{ [Error: EMFILE, open '/Users/aidan/Desktop/filepizza/filepizza/node_modules/react/package.json']
errno: 20,
code: 'EMFILE',
path: '/Users/aidan/Desktop/filepizza/filepizza/node_modules/react/package.json',
stream:
{ _readableState:
{ highWaterMark: 16,
buffer: [],
length: 0,
pipes: [Object],
pipesCount: 1,
flowing: true,
ended: false,
endEmitted: false,
reading: true,
sync: false,
needReadable: true,
emittedReadable: false,
readableListening: false,
objectMode: true,
defaultEncoding: 'utf8',
ranOut: false,
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null,
resumeScheduled: false },
readable: true,
domain: null,
_events:
{ end: [Object],
error: [Object],
data: [Function: ondata],
_mutate: [Object] },
_maxListeners: 10,
_writableState:
{ highWaterMark: 16,
objectMode: true,
needDrain: false,
ending: true,
ended: true,
finished: true,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: false,
bufferProcessing: false,
onwrite: [Function],
writecb: null,
writelen: 0,
buffer: [],
pendingcb: 0,
prefinished: true,
errorEmitted: false },
writable: true,
allowHalfOpen: true,
_options: { objectMode: true },
_wrapOptions: { objectMode: true },
_streams: [ [Object] ],
length: 1,
label: 'deps' } }
�[0mGET /js �[31m500 �[0m3521.111 ms - -�[0m
runtime errors:
/Users/aidan/Desktop/filepizza/filepizza/node_modules/browserify-middleware/node_modules/browserify/index.js:551
: opts.basedir || process.cwd()
^
Error: EMFILE, too many open files
at globalTr (/Users/aidan/Desktop/filepizza/filepizza/node_modules/browserify-middleware/node_modules/browserify/index.js:551:43)
at makeTransform (/Users/aidan/Desktop/filepizza/filepizza/node_modules/browserify-middleware/node_modules/browserify/node_modules/module-deps/index.js:251:21)
at /Users/aidan/Desktop/filepizza/filepizza/node_modules/browserify-middleware/node_modules/browserify/node_modules/module-deps/index.js:226:9
at Deps.getTransforms (/Users/aidan/Desktop/filepizza/filepizza/node_modules/browserify-middleware/node_modules/browserify/node_modules/module-deps/index.js:231:7)
at /Users/aidan/Desktop/filepizza/filepizza/node_modules/browserify-middleware/node_modules/browserify/node_modules/module-deps/index.js:366:24
at onresolve (/Users/aidan/Desktop/filepizza/filepizza/node_modules/browserify-middleware/node_modules/browserify/node_modules/module-deps/index.js:178:14)
at /Users/aidan/Desktop/filepizza/filepizza/node_modules/browserify-middleware/node_modules/browserify/index.js:480:13
at /Users/aidan/Desktop/filepizza/filepizza/node_modules/browserify-middleware/node_modules/browserify/node_modules/browser-resolve/index.js:254:13
at onfile (/Users/aidan/Desktop/filepizza/filepizza/node_modules/browserify-middleware/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/asyn
c.js:51:21)
at onex (/Users/aidan/Desktop/filepizza/filepizza/node_modules/browserify-middleware/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.
js:93:22)
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "start"
npm ERR! node v0.10.33
npm ERR! npm v2.1.11
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node index.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] start script 'node index.js'.
npm ERR! This is most likely a problem with the filepizza package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node index.js
npm ERR! You can get their info via:
npm ERR! npm owner ls filepizza
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/aidan/Desktop/filepizza/filepizza/npm-debug.log
npm-debug.log:
cat ./npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink /usr/local/bin/node
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info prestart [email protected]
7 info start [email protected]
8 verbose unsafe-perm in lifecycle true
9 info [email protected] Failed to exec start script
10 verbose stack Error: [email protected] start: `node index.js`
10 verbose stack Exit status 8
10 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:212:16)
10 verbose stack at EventEmitter.emit (events.js:98:17)
10 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:14:12)
10 verbose stack at ChildProcess.emit (events.js:98:17)
10 verbose stack at maybeClose (child_process.js:756:16)
10 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:823:5)
11 verbose pkgid [email protected]
12 verbose cwd /Users/aidan/Desktop/filepizza/filepizza
13 error Darwin 13.4.0
14 error argv "node" "/usr/local/bin/npm" "start"
15 error node v0.10.33
16 error npm v2.1.11
17 error code ELIFECYCLE
18 error [email protected] start: `node index.js`
18 error Exit status 8
19 error Failed at the [email protected] start script 'node index.js'.
19 error This is most likely a problem with the filepizza package,
19 error not with npm itself.
19 error Tell the author that this fails on your system:
19 error node index.js
19 error You can get their info via:
19 error npm owner ls filepizza
19 error There is likely additional logging output above.
20 verbose exit [ 1, true ]
Hi,
Since I dont find any new thread for suggestions,I post it under "Issues". Here are my suggestions anyway:
http://downforeveryoneorjustme.com/file.pizza replies:
It's not just you! http://file.pizza looks down from here.
I think this could be done using <input type="file" webkitdirectory directory multiple/>
EDIT: I've noticed that https://instant.io does have support for multiple files.
Hello,
I wanted to send a 1.8go file named "RM1104_059X4S9_1078.0038.10586.13080.13842.033255.zip" and impossible to have a link I have a bias .
Does filepizza recognize if two devices are on the same local network and does it make use of it for faster file transfer?
Do you really need to use a proprietary tracking service such as Google Analytics in FilePizza?
At least you should provide an option to disable it for self-hosted installations.
Would it be possible to replace the four toppings with a five letter code so it's easier to type?
Example: replace https://file.pizza/limburger-squash-chickentikka-pinenuts
with https://file.pizza/uNU30
Perhaps each topping list would have a corresponding 5 digit code and either could be typed in to redirect to the same file. Both could be shown at the time of uploading to give users a choice to use the topping url or shortcode url.
npm WARN deprecated [email protected]: Critical security issue fixed in 5.1.3. All users should upgrade. (More info: https://github.com/feross/bittorrent-dht/issues/87)
Please update!
This looks like a cool project, could you write up how it works and whatever else might be relevant in the Readme? Would be good to get that sort of overview when landing on the repo. or link up to a blog post or something :)
file.pizza instance:
WebSocket connection to 'ws://file.pizza/peer/peerjs?key=peerjs&id=5c282d4a-ee71-4849-a2b1-180f76218220&token=j4khg3a8yg44pldi' failed: Error during WebSocket handshake: Unexpected response code: 404
js:11 WebSocket connection to 'ws://file.pizza/socket.io/?EIO=3&transport=websocket&sid=Pl4_msu7sxmnnMCzABK0' failed: Error during WebSocket handshake: Unexpected response code: 400
js:1 Uncaught TypeError: Cannot read property 'on' of undefined
js:11 WebSocket connection to 'ws://file.pizza/socket.io/?EIO=3&transport=websocket&sid=NTr7iT3r4azxVwyfABK2' failed: Error during WebSocket handshake: Unexpected response code: 400
A local instance listens, but when you visit the site no Js nor css is loaded, just plain HTML.
I try to upload a file on Firefox 48 on Linux.
It stays at "Processing" indefinitely.
When looking at the javascript console I see two errors:
a) Firefox can't establish a connection to server wss://file.pizza/socket.io/?EIO=3&transport=websocket&sid=nyeb40GlD7oFHVhZAGQU js:32:4398
POST
XHR
https://file.pizza/socket.io/ [HTTP/2.0 200 OK 178ms]
GET
XHR
https://file.pizza/socket.io/ [HTTP/2.0 200 OK 19107ms]
Error: Invalid torrent identifier
The certificate chain is incomplete. I think this is causing issues in some browsers.
https://www.ssllabs.com/ssltest/analyze.html?d=file.pizza
I believe an intermediate certificate needs to be installed, but don't ask me for specifics. :-)
I would love to be able to install this via NPM and run it as a global command from any location in the terminal. Any plans on publishing it to NPM?
I'm using a shared-hoster which only allows ports between 61000 and 65535. For this reasons I want to redirect the port to the subdomain files.tristank.de. Normally this works great but for filepizza it just keeps downloading the index page as a file named download
as soon as I browse to files.tristank.de. Accessing filepizza directly with tristank.de:65150 does work. Any suggestions?
.htaccess
RewriteEngine On
RewriteRule ^(.*) http://localhost:65150/$1 [P]
$ curl -sL 'http://fp.tristank.de'
`
<title>FilePizza - Your files, delivered.</title><script id="bootstrap" type="application/json">{"ErrorStore":{"status":404,"message":"Not Found","stack":null},"SupportStore":{"isSupported":true,"isChrome":false},"DownloadStore":{"fileName":"","fileSize":0,"fileType":"","infoHash":null,"peers":0,"progress":0,"speedDown":0,"speedUp":0,"status":"uninitialized","token":null},"UploadStore":{"fileName":"","fileSize":0,"fileType":"","infoHash":null,"peers":0,"speedUp":0,"status":"ready","token":null}}</script><script src="/js"></script>BTC: 1P7yFQAC3EmpvsB7K9s6bKPvXEP1LPoQnY
Cooked up by Alex Kern & Neeraj Baid while eating Sliver @ UC Berkeley · FAQ · Fork us
<script data-reactid=".l1zogtimm8.1.2">FilePizza()</script><script data-reactid=".l1zogtimm8.1.3"></script>`Come on, we want it to work in intranet other places where you don't want it to call to Google. It is also a privacy issue.
So please just include your fonts locally.
How can we use a different log level?
The current "info" one is too verbose as I do not want to log each requested file with all request headers!
It would be great to have an indication if the person I send the link to has downloaded the file (so I can close the browser window). Right now, it only shows activity during an active download, but not after the download ended.
After finally fixing the #57 you already introduced another asset loaded from a third-party.
Again for self-hosted (internal business) installations, this is not a good thing as there all assets should be loaded locally.
I'm on Chrome 54 on Linux (connected to the internet via NAT).
I upload a file and visit the URL on another browser on firefox 48 running on the same machine.
I see the filename and size and click "download" in firefox.
Nothing happens.
Error is related on row 56 of server.js module, after launching filepizza (no extra parameters)
Details:
C:\Users\xxxx\AppData\Roaming\npm\node_modules\filepizza\lib\server.js:56
db.create(socket).then((u) => {
^
SyntaxError: Unexpected token >
OS: Windows 7 64 bit
Node version: v0.10.26
Npm version: v2.11.3
Python version: 2.7.10
Thank you for any suggestion.
Lewix
Trying file.pizza with with Chrome 45.0.2454.85. I get the following error when selecting a file: Uncaught TypeError: Failed to construct 'RTCPeerConnection': Malformed RTCConfiguration
.
On firefox 41.0, I get TypeError: 'iceServers' member of RTCConfiguration can't be converted to a sequence.
npm install isn't working ...
npm ERR! 404 'filepizza-socket' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
npm ERR! System Linux 3.13.0-52-generic
npm ERR! command "/home/qusai/.nvm/v0.10.22/bin/node" "/home/qusai/.nvm/v0.10.22/bin/npm" "install"
npm ERR! cwd /home/qusai/github.com/filepizza
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! code E404
It would be really useful if FilePizza showed the download percentage in the tab name so you can see the progress without having to actively check the tab.
Hey, after I tried to install FilePizza on a CentOS 6 - Server featuring shared hosting,
$ npm start
gave me the following errors:
During the installation, there was one error:
npm WARN optional dep failed, continuing [email protected]
The error log can be found on lpaste.net
npm: 2.9.1
node: 0.10.38
npm install goes without errors, only a few warnings of the form:
requires parseuri@'0.0.4' but will load
However, npm start
halts on:
Error: Cannot find module './lib/babel/api/register/node'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/pi/filepizza/node_modules/babel/register.js:1:80)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)`
I'm having trouble getting a filepizza instance (file.pizza) to work with iOS 10 as client on download.
I've tried with Firefox, Chrome and Bowser and all of them return "400: No WebRTC Support": https://www.openwebrtc.org/bowser/
Thank you for this incredible piece of software!
I'd like to change the socket.io path from /socket.io
to /mySubDir/socket.io
. How can I do that properly?
Hi.
It seems that the file,pizza site takes time to upload files. Check out the site https://filetea.me and load up both big and small files (especially big files) and you see how fast it uploads. I want it to upload as fast like https://filetea.me
If its possible to do that,it would be awesome.
While I remember. Do you know any other sites such as https://file.pizza that do the same thing as https://file.pizza then let me know
Is it possible to launch a headless browser to mange the upload half of sharing a file? My idea is a command-line fire & forget, since I tend to close my browser often.
As you advertise the Twilio's STUN/TURN service I am a bit unsure what happens when you do not use it: Because usually browsers have "baked in" their own TURN/STUN and signalling servers, so when WebRTC is e.g. used in Firefox Mozilla's servers are used for that.
This is especially important for the security of WebRTC as the signalling server could MITM the connection.
To prevent MITM attacks is there any additional encryption used - besides WebRTCs default one - such as SaltyRTC? If not you may consider this to improve the security.
Currently --
This webpage is not available
ERR_CONNECTION_REFUSED
Hey,
just installed filepizza as advertised on a Ubuntu 12.04 LTS (with node 0.12.7), starting it looks like this:
env PORT=3457 filepizza
FilePizza listening on :::3457
and then it returns to the prompt without any error messages. There's also no background process or something (already) listening on 3457.
Any idea?
Not demanding. Just asking. :) Either copyleft or permissive., although AGPL could be an interesting consideration for a network service like this.
Getting this when hitting the page... npm install -g babelify
did not help.
$ env PORT=8080 filepizza
FilePizza listening on :::8080
GET / 200 28.960 ms - -
GET /images/up.png 304 3.406 ms - -
GET /images/pizza.png 304 0.841 ms - -
events.js:85
throw er; // Unhandled 'error' event
^
Error: Cannot find module 'babelify' from '/Users'
at /usr/local/lib/node_modules/filepizza/node_modules/browserify-middleware/node_modules/browserify/node_modules/resolve/lib/async.js:50:17
at process (/usr/local/lib/node_modules/filepizza/node_modules/browserify-middleware/node_modules/browserify/node_modules/resolve/lib/async.js:119:43)
at /usr/local/lib/node_modules/filepizza/node_modules/browserify-middleware/node_modules/browserify/node_modules/resolve/lib/async.js:128:21
at load (/usr/local/lib/node_modules/filepizza/node_modules/browserify-middleware/node_modules/browserify/node_modules/resolve/lib/async.js:60:43)
at /usr/local/lib/node_modules/filepizza/node_modules/browserify-middleware/node_modules/browserify/node_modules/resolve/lib/async.js:66:22
at /usr/local/lib/node_modules/filepizza/node_modules/browserify-middleware/node_modules/browserify/node_modules/resolve/lib/async.js:21:47
at FSReqWrap.oncomplete (fs.js:99:15)```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.