https://github.com/kost/httpupload
Simple HTTP server for quick uploads in different languages
https://github.com/kost/httpupload
Last synced: about 2 months ago
JSON representation
Simple HTTP server for quick uploads in different languages
- Host: GitHub
- URL: https://github.com/kost/httpupload
- Owner: kost
- License: mit
- Created: 2023-11-12T20:06:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-12T20:32:19.000Z (over 1 year ago)
- Last Synced: 2025-01-31T06:39:40.163Z (4 months ago)
- Language: Go
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# httpupload
Simple HTTP server for quick uploads in different programming languagesNote: you should run it in trusted environments. No authentication and sanitization of inputs on purpose.
# Quick Usage
Start web server:
```
python3 httpupload.py
php -S 0.0.0.0:8000 -f -t httpupload.php
go run httpupload.go
```Of course, you can just place php file somewhere on PHP server as well.
You can use following commands to upload file (or just use browser):
```
curl -F '[email protected]' http://localhost:8000/
curl -X PUT --upload-file file.txt http://localhost:8000
wget -O- --method=PUT --body-file=file.txt http://localhost:8000/file.txt
```For obvious reasons, you have to use following for PHP server:
```
curl -F 'file[][email protected]' http://localhost:8000/
```# Reference
## Python
```
optional arguments:
-h, --help show this help message and exit
--port PORT, -p PORT Listening port for HTTP Server
--directory DIRECTORY, -d DIRECTORY
Specify alternative directory [default:current directory]
```## Go
```
-cert string
Specify [cert].crt and [cert].key to use for TLS
-dir string
Specify the upload directory (default ".")
-limit int
Specify maximum (in MB) for parsing multiform post data (default -1)
-listen string
Listen on address:port (default "0.0.0.0:8000")
-overwrite
Allow overwriting existing files
-q Be quiet
-tls
Listen on TLS
```