A simple, cross-platform desktop application built with Kivy for quick and easy file sharing between devices on the same local network. This tool allows you to send and receive files with a minimalistic user interface.
- Automatic Local IP Detection: Automatically finds and displays your local IP address (primarily
192.168.x.xrange, preferring non-VPN interfaces). - Sender and Receiver Modes: Easily switch between sending files to another device or listening for incoming files.
- Drag-and-Drop Sending: Quickly send files by dragging them directly onto the application window.
- Multiple File Selection: Select multiple files at once to send them in sequence.
- File Transfer Progress Bar: Visual feedback on the progress of file transfers.
- Automatic Filename Handling: If a received file has the same name as an existing file, it will be saved with a numerical suffix (e.g.,
file_1.txt,file_2.txt). - Persistent Configuration: Remembers your last used recipient IP address and save folder.
- Open Save Folder: Convenient button to directly open the chosen save directory.
- Cross-Platform: Designed to work on Windows, macOS, and Linux.
- Python 3.7+
-
Clone the repository:
git clone https://github.com/satifiedx/file_sharing.git cd quick-file-sharer -
Create a virtual environment (recommended):
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install dependencies:
The application relies on
Kivyfor the GUI andplyerfor native file dialogs.pip install -r requirements.txt
or manually
pip install kivy plyer pyfiglet
-
Start the application:
python sender_main.py
-
Identify your Local IP: Your local IP address will be automatically detected and displayed in the "This computer's IP address" field. This is the IP you will share with others to receive files, or the IP you will enter in another instance of the app to send files to this one.
-
To Receive Files:
- Choose a Save Folder: Click "Choose save folder..." and select a directory where incoming files will be saved. You can also click "Open folder" to quickly access it.
- Become a Receiver: Click the "I am Receiver" button. The button will change to "Stop Receiving" and the status will show "Server is running. Waiting for files...". Your app is now ready to receive files.
- Stop Receiving: Click "Stop Receiving" to shut down the server.
-
To Send Files:
- Enter Recipient IP: In the "Recipient IP address" field, enter the IP address of the computer that is set up as a receiver (their "This computer's IP address").
- Choose Files: Click the "Send File(s)" button to open a file browser and select one or more files.
- Drag and Drop: Alternatively, simply drag files from your file explorer directly onto the application window to initiate sending.
- The app will show the progress of each file transfer.
The application uses standard TCP sockets for file transfers.
- Receiver Mode: The application acts as a server, binding to
0.0.0.0(all available network interfaces) onPORT 65432. It listens for incoming connections. When a connection is established, it first receives 4 bytes indicating the length of the metadata, then the metadata itself (filename and filesize, separated by|), and finally the raw file data in chunks. - Sender Mode: The application acts as a client, connecting to the specified recipient IP address on
PORT 65432. It sends the metadata length, then the metadata (filename and filesize), and then streams the file's binary data. - IP Detection: The
get_local_ipfunction attempts to find a local IP address (specifically in the192.168.x.xrange) by parsingipconfig(Windows) orip addr show/ifconfig(Linux/macOS) output. It tries to filter out VPN-related interfaces for a more reliable local network IP.
kivyplyer(optional, but highly recommended for native file dialogs)pyfigletfor banner
Contributions are welcome! If you have suggestions for improvements, bug reports, or want to add new features, please feel free to:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature). - Make your changes.
- Commit your changes (
git commit -m 'Add new feature'). - Push to the branch (
git push origin feature/your-feature). - Open a Pull Request.
