Easy P2P file transfer powered by WebRTC - inspired by Apple AirDrop 一个开源的 Web 应用,允许用户在局域网里通过 WebRTC 分享文件。如果不在同一局域网,可以进入同一个页面进行分享。
Go to file
Maciej Jarczok a5e33eff63 fix conflict
2014-05-03 17:57:38 +02:00
app fix conflict 2014-05-03 17:57:38 +02:00
tasks Rename FileDrop to ShareDrop 2014-03-10 09:32:01 +01:00
.buildpacks Use multi-buildpack gem for Heroku. 2014-01-29 20:55:26 +01:00
.env.sample Track size of transferred files using GA 2014-04-14 21:11:39 +02:00
.gitignore Add NewRelic 2014-03-17 18:05:11 +01:00
firebase_rules.json Validate user data in Firebase to prevent incomplete records 2014-03-29 21:35:22 +01:00
Gemfile fix grunt comapss 2014-03-18 15:11:14 +01:00
Gemfile.lock fix grunt comapss 2014-03-18 15:11:14 +01:00
Gruntfile.js fix distribution image path 2014-05-03 14:33:19 +02:00
LICENSE Add license 2014-03-19 18:23:30 +01:00
newrelic.js Add NewRelic 2014-03-17 18:05:11 +01:00
package.json Merge branch 'firebase' 2014-03-18 19:46:24 +01:00
Procfile Use grunt to build the app. 2014-01-29 20:40:56 +01:00
README.md Initial Firefox support. 2014-03-28 20:00:46 +01:00

ShareDrop

ShareDrop is HTML5 clone of Apple AirDrop service. It allows you to transfer files directly between devices, without having to upload them to any server first. It uses WebRTC for secure peer-to-peer file transfer and Firebase for presence management and WebRTC signaling.

At the moment ShareDrop allows you to send files only to other devices in the same local network, i.e. devices with the same public IP address.

The main difference between ShareDrop and AirDrop is that ShareDrop requires internet connection to find devices, while AirDrop doesn't need one - it creates ad-hoc wireless network between them. On the other hand, ShareDrop allows you to send files between mobile (Android) and desktop devices.

Supported browsers

  • Chrome (desktop and Android) 33+
  • Opera (desktop and Android) 20+
  • Firefox (desktop and Android) 28+ (though we suggest using Chrome or Opera for transferring larger files)

How to set it up for local development

  1. Setup Firebase:
    1. Sign up for a Firebase account and create a database.
    2. Go to "Security Rules" tab, click "Load Rules" button and select firebase_rules.json file.
    3. Take note of your database URL and its secret, which can be found in "Secrets" tab.
  2. Run npm -g install grunt-cli to install Grunt.
  3. Run npm install to install NodeJS dependencies.
  4. Run bundle install to install Ruby dependencies.
  5. Run cp .env{.sample,} to create .env file. This file will be used by Grunt to set environemnt variables when running the app locally. You only need NEW_RELIC_* variables in production.
  6. Run grunt serve to start the app.
  7. Run grunt build to build production version of the app to dist directory.

Deployment

When deploying to Heroku, use multi buildpack.

For new apps:

heroku create myapp --buildpack https://github.com/ddollar/heroku-buildpack-multi.git

For existing apps:

heroku config:set BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git