Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antsmartian/share-files
Share files over the same network via QR code
https://github.com/antsmartian/share-files
nodejs qrcode sharing utility
Last synced: about 2 months ago
JSON representation
Share files over the same network via QR code
- Host: GitHub
- URL: https://github.com/antsmartian/share-files
- Owner: antsmartian
- Created: 2018-03-25T06:28:48.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-01T10:53:20.000Z (over 6 years ago)
- Last Synced: 2024-04-23T13:18:42.561Z (8 months ago)
- Topics: nodejs, qrcode, sharing, utility
- Language: JavaScript
- Size: 11.4 MB
- Stars: 14
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# share-files
share-files is a simple tool to create a file sharing service using [NodeJS](https://nodejs.org/en/). You can list files and share-files will generate a QR code. Scan the QR code on a mobile device to download the files! Supports zip and multiple files!Note: the mobile device scanning the QR code should be in the same network to download the file(s).
![screenshot](demo.gif)
## How does it work?
share-files binds a web server to the address of your WiFi network interface on a 3000 port, and sets a default handler for it. The default handler serves the content.
The program prints a QR code that encodes the text:
```
http://{address}:3000
```Most QR apps can detect URLs in decoded text and act accordingly (i.e. Open the URL with the default browser), so when the QR code is scanned the content starts being downloaded by the mobile browser.
## Installation
Install using [npm](https://www.npmjs.com/get-npm)```
npm install -g share-files
```## Usage
To share a single file:
```
share-files --files
```This will list all your available network interfaces, pick one and then the QR code will be generated. Scan the QR code using your mobile device to download the file.
To download multiple files:
```
share-files --files ,,
```Separate multiple files with a `,` and the code will be generated once the zip file is created. Scan the QR code to download the zip file
## Why?
I always wanted to share files/movies from my mac to my phone. I used Airdroid and it annoys me with signup, etc. so I created one. Anyways, it's fun :)## Todo:
1. Support HTTPS
2. Remove Express.js dependency. We can build without Express.js.
3. Zip takes more time for larger files more than 2GB, check them.## Contribute
If you see any issues, any improvements, please feel free to raise a PR.