The micro autoindex and file hosting server with one Flask framework dependence, with ability to upload files.
Project description
Table of Contents
Description
The micro autoindex and file hosting server with one Flask framework dependence. HTTP server that allow to download and upload files.
Features:
Allow to transfer files between systems easily and safely.
- ftp-like design
- ability to uplaod file
- protection from folder escaping and injecting
- size calculation
- configuration with enironmental variables
- optional basic file type recognition: text, image, audio, video
- optional ability to prevent downloading of small files to use browser as a text reader.
Dependencies
Python version >= 3.10
Flask >= 2.3.2
Lower version may work as well.
Usage
export FLASK_RUN_HOST=0.0.0.0 FLASK_RUN_PORT=8080
export FLASK_BASE_DIR='/home/user'
python -m micro_file_server --host=0.0.0.0
# or
python micro_file_server/__main__.py
Here is defaults, that you can change:
export FLASK_FILENAME_MAX_LENGTH=40
export FLASK_MIMETYPE_RECOGNITION=True
export FLASK_SMALL_TEXT_DO_NOT_DOWNLOAD=True
export FLASK_SMALL_TEXT_ENCODING="utf-8"
export FLASK_FLASK_UPLOADING_ENABLED=True
Built-in web server is secure enough, but to execute with pip install gunicorn
gunicorn micro_file_server.__main__:app
Screenshot
Keywords
Filesharing, fileserver, httpserver, microhttp.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file micro_file_server-0.1.tar.gz
.
File metadata
- Download URL: micro_file_server-0.1.tar.gz
- Upload date:
- Size: 56.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 775673edf95f1b9bf122bc3fd2321e923701d56fd3a0bad7cb73d57f6b818f21 |
|
MD5 | e367f2b92ac3fcbf15dcd2ec42f368b3 |
|
BLAKE2b-256 | 8c2372526a653310c35cf5c2340070be966615e69209cb6fbf7b7d298eb5752e |
File details
Details for the file micro_file_server-0.1-py3-none-any.whl
.
File metadata
- Download URL: micro_file_server-0.1-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a57a6adfda530e7aa0363bf5ccd7a1355c41bdbc31f540b4295a293d713b141 |
|
MD5 | 6ea5662100fc4aad3f42bd6b5de6790f |
|
BLAKE2b-256 | 4431c426450899593e4ed1d7854672ec59ee74be27d57f60534b09e03c81639b |