1.0.0 • Published 3 years ago

instant-public-file v1.0.0

Weekly downloads
2
License
ISC
Repository
-
Last release
3 years ago

instant-public-folder

Using ngrok, instantly give a folder from your computer a public url. Allow your friends to transfer large files without first uploading to the cloud, and without authenticating.

Usage

npx instant-public-folder

OR

npm -g instant-public-folder
instant-public-folder

And send the https url from the ngrok interface to your friends!

How to Zip

You probably want to zip any large files first. Here are some ways to do that on OSX:

brew install p7zip
7z a name-of-my-archive.7z file1 file2 fileN
brew install zip
zip -9 -u name-of-my-archive.zip file1 file2 fileN
tar -czf name-of-my-archive.tar.gz file1 file2 fileN

Or just right click a folder in Finder and choose "Compress" :)

Features / Notes

  • Built in directory listing
  • Finds a random port, so run as many as you'd like!
  • Uses send module, which supports resuming, streaming, and range requests.
  • Allows anyone to download a file
  • Nearly zero security (at least has HTTPS!)
  • No auth / accounts required (unless you want to use paid ngrok)
  • Note: ngrok is a closed-source binary, and its tunnels expire unless you pay/auth. Generally most downloads complete within the expiration window, assuming you have a fast enough connection.

Why???

Sometimes I find the need to send a large file to a friend. Large meaning > 1GB. I could upload it to Google Drive, or Dropbox, or Mega Upload, but what if your file is larger than your limit?

Additionally, an HTTP link is much easier for an end user to manage than a cloud service link. No authentication, no login, no signups. Just the file.

It's actually non-trivial to work through a network's NAT/Firewall, so this module uses ngrok to provide a public, one-time URL. I think this is a nice balance of security through obscurity and ease of use.

License

ISC