An open API service indexing awesome lists of open source software.

https://github.com/javanile/upload

📤 Upload files with cURL and Docker
https://github.com/javanile/upload

curl docker file-upload

Last synced: about 2 months ago
JSON representation

📤 Upload files with cURL and Docker

Awesome Lists containing this project

README

        

# 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
bash test.sh
```

## How to contribute

Get detailed information on thie file [CONTRIBUTE.md](CONTRIBUTE.md)

## License

Creative Commons Attribution 3.0 Unported [LICENSE](LICENSE)