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.
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
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
micro_file_server-0.0.9.tar.gz
(55.9 kB
view hashes)
Built Distribution
Close
Hashes for micro_file_server-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0b17492806adf2ca95b04cd9be4d241644086b98fd79000cc5f45ce84f3becb |
|
MD5 | 1411a4c974e52d6689e6a4d1c966f949 |
|
BLAKE2b-256 | 5a94ad3bab777b0870d435ee2a21cd67ec49a9c7bb52e50e455ecb649b3da0e9 |