Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nitwhiz/stagecoach
A HTTP File Upload Service
https://github.com/nitwhiz/stagecoach
file-upload http
Last synced: 18 days ago
JSON representation
A HTTP File Upload Service
- Host: GitHub
- URL: https://github.com/nitwhiz/stagecoach
- Owner: nitwhiz
- Created: 2023-04-09T17:53:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-09T19:27:09.000Z (over 1 year ago)
- Last Synced: 2024-06-21T07:37:04.668Z (5 months ago)
- Topics: file-upload, http
- Language: Go
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# stagecoach
A server to upload files to a specific directory via HTTP.
## Example Config
The config file should reside in `/etc/stagecoach/stagecoach.yml` or in the current working directory.
`authorizationToken` is a sha512 hash used to authorize requests, it's like a password. (Example is "MyTopSecretToken")
```yaml
destinationDirectory: /tmp/test
authorizationToken: fdd07c6da3405b29aa912e39662fd2cb6e19fde35ec9a81c708fcfb265aff7a15ad0c5cbd87370bf096035bc43a58351c437e6ef599077bcbfbbf0aabcbfd770
```## Running via docker
Start the container with
```shell
docker run --rm \
-v $(pwd)/stagecoach.yml:/etc/stagecoach/stagecoach.yml \
-p 4444:4444 \
ghcr.io/nitwhiz/stagecoach:latest
```## Uploading files
After starting the server, you can upload files via `POST http://localhost:4444/upload`:
```shell
curl --request POST \
--url http://localhost:4444/upload \
--header 'Authorization: Token MyTopSecretToken' \
--header 'content-type: multipart/form-data' \
--form file=@file \
--form 'name=my_test_file.txt'
```Existing files are not overwritten.