Skip to main content

A small cross-platform LAN file upload/download server with resumable transfers.

Project description

py-lan-file-server

A small cross-platform Python HTTP server for sharing one folder on a local network. Start it from the command line, open the printed URL in a browser, and LAN users can upload, search, and download files.

Features

  • Clean browser UI with file search, drag-and-drop upload, size display, and modified timestamps.
  • Live upload status over WebSocket, including uploads started by other clients.
  • Resumable downloads through standard HTTP Range requests.
  • Resumable browser uploads through chunked transfer.
  • Upload cancellation from the originating browser client.
  • Streaming upload and download paths, suitable for large files.
  • Same-name uploads replace the existing file after the new upload completes.
  • No runtime dependencies beyond the Python standard library.

Requirements

Python 3.9 or newer.

Run From Source

python -m lan_file_server --dir ./shared --host 0.0.0.0 --port 8000

Open the URL printed in the terminal. Other devices on the same LAN can use the printed LAN address, for example http://192.168.1.23:8000/.

The shared directory is created automatically when it does not exist. The default directory is ./shared.

Install The Command

python -m pip install .
lan-file-server --dir ./shared --port 8000

Upload Resume

The web page splits files into chunks before uploading. If the browser tab is closed or the network drops, open the page again, select the same local file, and start the upload. The server continues from the bytes it already received.

Temporary upload data is stored in .uploads under the shared directory and is hidden from the file list. When an upload completes, the temporary file is moved atomically into the shared directory and replaces any same-name file.

Live Uploads And Cancellation

Connected browser clients receive upload status through WebSocket. The upload panel shows active uploads from all clients and marks each row as either This client or Other client.

Only the browser client that started an upload can cancel it from the page. A manual cancellation aborts the local request and removes the server-side temporary upload file. If a connection drops unexpectedly, the active upload row is removed from connected pages and the incomplete in-flight chunk is rolled back; previously completed chunks remain available for resume.

Download Resume

Downloads support HTTP Range, so browsers, download managers, and tools such as curl -C - can resume interrupted downloads.

CLI

lan-file-server [directory] [--dir DIR] [--host HOST] [--port PORT] [--chunk-size BYTES]

Common examples:

lan-file-server --dir ./shared
lan-file-server ./shared --host 0.0.0.0 --port 8000

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

py_lan_file_server-0.1.0.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

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

py_lan_file_server-0.1.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file py_lan_file_server-0.1.0.tar.gz.

File metadata

  • Download URL: py_lan_file_server-0.1.0.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.11.15 Windows/10

File hashes

Hashes for py_lan_file_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 769ef994bede728a8724df0b82d3ad2288c20f311a5dc65e8948138494ba1f4f
MD5 3227e55242204b5cf92c12abf7d98f47
BLAKE2b-256 e401c5f395a28cd2a9a79f7bcb09ddc7c9697a0aa4d8f62b86eccf479d9ecfe5

See more details on using hashes here.

File details

Details for the file py_lan_file_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for py_lan_file_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 283bd943716852915e1e99584f21f99b3b66fd92a298343e23c4036d5fc2c639
MD5 0afee05d8add8447b2572034f66ef94f
BLAKE2b-256 23abfd6fde4645f455abf84006bd0e1e36adc7e1d068a5550656416fcb261c5f

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