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
- Host: GitHub
- URL: https://github.com/javanile/upload
- Owner: javanile
- License: mit
- Created: 2020-10-19T16:59:38.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-20T17:10:03.000Z (over 4 years ago)
- Last Synced: 2025-02-04T16:50:36.687Z (4 months ago)
- Topics: curl, docker, file-upload
- Language: PHP
- Homepage:
- Size: 14.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)