Giter Club home page Giter Club logo

docker-simple-file-upload's Introduction

simple-file-upload

Docker container that provides an API endpoint for simple, secure file uploads.

This docker container exposes a single, write-only endpoint at /upload that accepts a single file along with a token GET parameter for authentication. The authentication for the endpoint, along with the location of the uploaded file, is configured using environment variables on the container.

You can upload a file with curl like so:

> curl -XPOST -F '[email protected]' dockerhost:3000/upload?key=TESTUSER

Multiple keys are supported, and every key is a 1:1 mapping to a location on disk. Any additional uploads for a key will override the previous upload for that key.

The design goals for this container are a secure upload tool that:

  1. Can only be used to upload files, not download or read them
  2. Can only be used with a matching authentication key
  3. Can only upload to a single location per authentication key
  4. Can only override the previous upload, not store additional uploads

How to Use

Basic usage is as follows:

docker run \
  -e "KEY_TESTUSER=/uploads/testuser-file.txt" \
  -v /my_local_dir/:/uploads/ \
  -p 3000:3000 \
  twostoryrobot/simple-file-upload

This will start the upload server, listening on port 3000. Files that are uploaded with the key TESTUSER will be placed at /uploads/testuser-file.txt. You can use a volume to get easy access to this file on your host machine, or in another container.

docker-simple-file-upload's People

Contributors

calebissharp avatar chrisfosterelli avatar dependabot-preview[bot] avatar dependabot[bot] avatar renovate-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.