Giter Club home page Giter Club logo

share's Introduction

share
Version

Easy simple file sharing from the browser and command-line. Try it at share.schollz.com.

share is an open-source server where you can easily share files through the browser or the terminal. share is inspired by transfer.sh and send.firefox.com which also store files temporarily after uploading via the browser or command-line.

One main new feature in share specifically is that the files are stored for time based on the file size, so that smaller files will stay available longer (by default, the time to deletion is scaled so that 1 GB file will be deleted after 30 minutes). Another nice improvement is that each uploaded file gets a permalink based on the hash of file content, so you can easily share a unique content-addressable six-digit identifier instead of a long filename.

Usage

Open the browser share.schollz.com and upload a file.

Alternatively you can upload via the command-line:

Upload a file

$ curl -L --progress --upload-file README.md share.schollz.com
https://share.schollz.com/bemi4x/README.md

Use this .bashrc/.zshrc shortcut:

alias share='f() { curl --progress-bar --upload-file "$1" https://share.schollz.com | tee /dev/null; echo };f'

Download a file

You can download the file with just the unique ID, or with the filename added. So each of these are identical:

$ curl -L share.schollz.com/bemi4x
$ curl -L share.schollz.com/bemi4x/README.md

or you can use wget:

$ wget --content-disposition share.schollz.com/bemi4x

Install

You can easily install and run share on your own computer or server. First, make sure to install Go. Then clone the repo and generate the code and run.

$ git clone https://github.com/schollz/share.git
$ cd share/
$ go generate
$ go build -v
$ ./share

Use the flags (see share --help) for setting the max directory size, max file size, port, etc.

Docker

You can also easily install and run with Docker (an 8MB image!).

$ docker run -d -v `pwd`/data:/data -p 8222:8222 schollz/share

If you are running on a public server, be sure to include -e url=https://YOURURL.com when running with Docker so that it presents the right URL in HTTP responses.

Acknowledgements

This is inspired by other great file transfer utilities and also utilizes Dropzone.js and uses logos from Logodust.

License

MIT

share's People

Contributors

schollz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.