Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

upload

The simplest docker file uploader. It allows to upload a file or a list files.

Adding to docker compose

To add the file uploader service with all default settings to your mu.semte.ch project add the following snippet to your docker-compose.yml file:


services:
  upload:
    image: javanile/upload
    environment:
      - UPLOAD_SECRET=mysecret
    ports:
      - 8080:80
    volumes:
      - ./files:/files

Options

This micro-service is used to store file on server.

In addtion to those you who wish to can also set the following variables:

  • UPLOAD_SECRET: The value of the key required to post file

Features

  • Simple PHP script for uplaod files
  • Upload Large files (at least 1GB)
  • Place all uploaded files into '/files' directory
  • If file already exists move the old file into backup directory than add postfix with date (eg. large_file_20200212201222.zip (Year-Month-Day-Hour-Minutes-Second))
  • Last uploaded file must keep the original name

exmaple of a docker-compose.yml set up

This set up shows the file uploader service with all variables set and the upload service connected to the delta-service

  upload:
    image: javanile/upload
    environment:
      - UPLOAD_SECRET=secret1234
    ports:
      - 8080:80
    volumes:
      - ./uploads:/files

example of usage

This is how the service could be used with a curl call if it is put in a docker-compose.yml file as uploader:

curl -H "Authorization: Bearer secret1234" -F "@large_file.zip" http://localhost:8080

Testing

bash test.sh

How to contribute

Get detailed information on thie file CONTRIBUTE.md

License

Creative Commons Attribution 3.0 Unported LICENSE

About

📤 Upload files with cURL and Docker

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.