Coder Social home page Coder Social logo

droplink's Introduction

DropLink

A simple private file sharing site, similar to file hosters.

Upload a single file on an upload page (authenticate via a private URL) and get a download URL that's hard to guess. Data is stored on the filesystem.

If you want, uploaded files are cleaned up after a specified amount of time.

Screenshot after upload

DropLink generates URLs like this:

https://example.com/dl/5Riewe4y/README.md

The URLs also work as short-URLs without the last filename part:

https://example.com/dl/5Riewe4y

Installation

Compilation requires Go.

go get https://frister.net/go/droplink

Running

DropLink is configurable via environment variables. When running on the public internet, you should at least specify an ADDRESS and an UPLOAD_SECRET and use a reverse proxy with TLS in front of DropLink.

Available environment variables:

  • ADDRESS - Address to listen on. Default: localhost:8000
  • DATA_DIR - Where to store the uploaded files. Default: ./data
  • PATH_PREFIX - URL path prefix to strip before handling the request. Required when running in a subpath behind a reverse proxy. Example: /downloads, default: (empty)
  • URL_PREFIX - Absolute URI that's used as prefix for generated URLs, with trailing slash (/). Example: https://example.com/downloads/, default: http://localhost:8000
  • UPLOAD_SECRET - Secret required for uploading files, you'll later have to put it into the URL, so might not want to use any fancy characters. Example: 2db19923c912b3ebbc373067
    • OpenSSL can generate such a secret for you: openssl rand 12 -hex
  • CLEANUP_AFTER_HOURS - Delete files after the specified number of hours. Also requires CLEANUP_EVERY_MINUTES to be set. Example: 720 for 30 days (24 * 30), default: (no deletion)
  • CLEANUP_EVERY_MINUTES - Check for files to delete every X minutes. Also requires CLEANUP_AFTER_HOURS to be set.

With the environment variables set, you can run droplink:

droplink

DropLink logs to STDERR.

License

AGPLv3

droplink's People

Contributors

mfrister avatar

Stargazers

 avatar  avatar  avatar

Forkers

miayotlan

droplink's Issues

404 (Page not found) on any request

Can't get it working.

[(2016/02/02 16:38:57 Invalid path: /]

$ curl http://localhost:8000 -v
< HTTP/1.1 404 Not Found
< Content-Type: text/plain; charset=utf-8
< Date: Tue, 02 Feb 2016 13:39:20 GMT
< Content-Length: 19
<
404 page not found

Environment variables - default

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.