https://github.com/yaacov/filedropserver
FileDropServer is a lightweight Python-based HTTP server that allows seamless file uploads and retrieval through POST and GET requests.
https://github.com/yaacov/filedropserver
Last synced: 3 months ago
JSON representation
FileDropServer is a lightweight Python-based HTTP server that allows seamless file uploads and retrieval through POST and GET requests.
- Host: GitHub
- URL: https://github.com/yaacov/filedropserver
- Owner: yaacov
- License: gpl-3.0
- Created: 2024-09-04T11:39:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-04T12:31:40.000Z (about 1 year ago)
- Last Synced: 2025-03-16T23:42:11.842Z (7 months ago)
- Language: Python
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FileDropServer
FileUploaderServer is a lightweight HTTP server built with Python that allows users to upload files. The server accepts file uploads via POST requests and stores them in a specified directory. Each upload can either use a custom filename (provided in the request headers) or have a unique name generated automatically. Users can retrieve
an uploader.py utility by sending GET requests to the server.## Features:
Supports file uploads via POST requests with multipart form data.
Automatically generates unique filenames for each upload or accepts a custom filename from the request.
Serves an uploader utility via GET requests.
Simple to configure and run without external dependencies.## Usage:
### Start the server:
```bash
python server.py
```The server listens on port 8000 by default and stores uploaded files in the uploads/ directory.
### Upload a file using the uploader.py utlity:
```bash
# Fetch the uploader
curl http://:8000/ -o uploader.py# Upload a file
python uploader.py our_file.tar.gz
```### Upload a file using curl:
```bash
# Set file name
curl --data-binary @your_file.tar.gz -H "X-Filename: custom_name.tar.gz" http://:8000/# Uploader will asign a rundom name to the file
curl --data-binary @your_file.tar.gz http://:8000/
```### Retrieve the file via a GET request:
```bash
curl http://:8000/ -o uploader.py
```