Skip to main content

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

  1. Description
  2. Features:
  3. Dependencies
  4. Usage
  5. Screenshot

-- 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

micro_file_server-0.0.7.tar.gz (55.9 kB view hashes)

Uploaded Source

Built Distribution

micro_file_server-0.0.7-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page