A lightweight web-based file transfer tool for sharing files and folders between devices on the same local network.
- File Upload - Upload single or multiple files via button or drag-and-drop
- Folder Upload - Upload entire folders while preserving directory structure
- Directory Browsing - Navigate into folders, browse contents, download individual files
- Breadcrumb Navigation - Quickly jump back to any parent directory
- Upload Progress - Real-time progress bar during uploads
- File Management - Download and delete files; delete entire folders
- QR Code - Scan to quickly access from a mobile device
- Custom Directory - Specify a custom storage directory via command line
- Responsive UI - Works on desktop and mobile browsers
- Node.js v14 or later
cd lan-transfer
npm installnode server.jsnode server.js /path/to/your/directorynode server.js ~/shared-filesOn startup, the server prints the access URLs:
========================================
LAN File Transfer Server
========================================
Local: http://localhost:3000
LAN: http://192.168.1.100:3000
Dir: /home/user/shared-files
========================================
Open the LAN address on any device connected to the same network to start transferring files.
- Start the server on one computer.
- Open the displayed LAN URL in a browser on any device in the same network.
- Upload: Click "Select Files" / "Select Folder", or drag and drop files/folders onto the page.
- Browse: Click a folder name to open it. Use the breadcrumb trail to navigate back.
- Download: Click the "Download" button next to any file.
- Delete: Click the "Delete" button to remove a file or folder.
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/files?dir=<path> |
List files and folders in a directory |
POST |
/api/upload?dir=<path> |
Upload files (multipart form: files[] + paths[]) |
GET |
/api/download/<path> |
Download a file |
DELETE |
/api/files/<path> |
Delete a file or folder |
POST |
/api/mkdir |
Create a new directory (JSON body: {dir, name}) |
GET |
/api/qrcode |
Get server URL and QR code data URI |
| Option | Default | Description |
|---|---|---|
| Port | 3000 |
Hardcoded in server.js (edit PORT to change) |
| Max file size | 5 GB |
Per-file upload limit |
| Storage directory | ./uploads |
Override via command line argument |
MIT