The micro autoindex and file hosting server with one Flask framework dependence. - ftp-like design - ability to uplaod file - protection from folder escaping - size calculation - configuration with enironmental variables - optional basic file type recognition: text, image, video - optional ability to prevent downloading of small files to use browser as a text reader. usage: ``` export FLASK_RUN_HOST=0.0.0.0 FLASK_RUN_PORT=8080 FLASK_BASE_DIR='/home' ; flask --app main --no-debug run ```
Project description
Table of Contents
-- mode: Org; coding: utf-8; --
Description
The micro autoindex and file hosting server with one Flask framework dependence.
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'
flask --app micro_file_server/__main__ run --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
Screenshot
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
Hashes for micro_file_server-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44d3297975c89be1bc60374738a34c1a10955a7827c505845d79338f0680e9c9 |
|
MD5 | fb54a2f4e97468273a3b4023e2dc1bd1 |
|
BLAKE2b-256 | a04536ce897cd63815638157b87eaf573b148259d207ed9f324928a7eb61c467 |