Skip to main content

A Python 3.7+ file server with directory listing, range download, and resumable upload.

Project description

web-fss

web-fss is a practical replacement for python -m http.server.

Features

  • Directory listing Web UI
  • Resume download via HTTP range (206 Partial Content)
  • Web upload button with chunked upload
  • Same-name conflict check before upload
  • Conflict options: overwrite / rename / cancel
  • Overwrite or resume upload flow
  • .upload metadata for upload progress
  • Auto-remove .upload after upload completion
  • File and folder delete button in UI
  • Open mode switch in UI: Preview (browser MIME rendering) / Download
  • --serve-index-html to auto-serve index.html/index.htm on directory request
  • Reverse proxy sub-path support via --base-path

Python compatibility: 3.7 to 3.13 (and newer 3.x).

Install

pip install web-fss

For local development:

pip install -e .

Run

Default (current directory, port 8000):

web-fss

or

python -m web_fss

Tip (recommended quick run):

uvx web-fss

Custom port and directory:

web-fss 9000 -d /data/files

Bind local only:

web-fss -b 127.0.0.1

Disable upload:

web-fss --no-upload

Show hidden files (dotfiles):

web-fss --show-hidden

Set upload chunk size (default 4MB):

web-fss --chunk-size 1048576

Auto-serve index.html/index.htm for directory requests:

web-fss --serve-index-html

Serve behind a reverse proxy path prefix:

web-fss -b 127.0.0.1 --base-path /files

Use --base-path when the proxy forwards requests with the prefix still present, such as /files/.api/list and /files/example.zip. If the proxy strips /files before forwarding to web-fss, no extra option is required; the Web UI builds API URLs from the current browser path.

Resumable Upload

When uploading a.zip, server creates:

  • a.zip (target file)
  • a.zip.upload (JSON metadata)

Metadata fields:

  • file_size
  • uploaded_ranges ([start, end))
  • bytes_received
  • completed

When uploading same filename again:

  1. Check existing file and .upload
  2. Resume if state is valid
  3. Otherwise overwrite
  4. Remove .upload after completion

API Endpoints

  • GET /.api/list?directory=/path/
  • POST /.upload/check
  • POST /.upload/init
  • POST /.upload/chunk
  • POST /.upload/delete
  • DELETE /.upload/delete

When --base-path /files is used, these endpoints are available under /files, for example GET /files/.api/list?directory=/path/.

License

MIT

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

web_fss-0.2.4.tar.gz (26.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

web_fss-0.2.4-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file web_fss-0.2.4.tar.gz.

File metadata

  • Download URL: web_fss-0.2.4.tar.gz
  • Upload date:
  • Size: 26.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for web_fss-0.2.4.tar.gz
Algorithm Hash digest
SHA256 6c4b0da6d5bf9b1e658b4e88f07525ca14d502175df5958c2fdc9b775d4d6608
MD5 da2d6ad506f13b0cad687453a7a640a2
BLAKE2b-256 bc463cb7a1db1b90cdeae1d7327b4bf3802b56321b3467ba61e116a58245cec2

See more details on using hashes here.

File details

Details for the file web_fss-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: web_fss-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for web_fss-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9aa4ae6e8441080027df030eb7496efde215ac06ab7f70e1c1d38598824d24cc
MD5 cacf467416d07429d29f78469d69decf
BLAKE2b-256 433705bfc3075b27bacf7deba1a4380db69272e500fa6c18b952ec54a2c89e4e

See more details on using hashes here.

Supported by

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