A Java-based client-server application for transferring files over a network. This project implements a simple file transfer protocol allowing clients to upload and download files from a server.
- Client-server architecture
- File upload and download
- Message logging and user management
- Chunked data transfer for large files
- Java Development Kit (JDK) version 8 or higher
- Windows operating system (for the provided batch scripts)
-
Clone the repository:
git clone https://github.com/Sayjad21/file_transfer_system.git cd your-repo-name -
Ensure Java is installed:
java -version
The project includes a compilation script. Run it from the project root:
compile.bat
This will compile all Java source files in the src/ directory and place the class files in the bin/ directory.
-
Start the Server: Open a command prompt in the project directory and run:
run-server.batThe server will start listening on the configured port (default: check ServerConfig.java).
-
Start the Client: Open another command prompt and run:
run-client.batFollow the on-screen prompts to connect to the server and perform file operations.
.
├── cleanup.bat # Script to clean compiled files
├── compile.bat # Script to compile the project
├── run-client.bat # Script to run the client
├── run-server.bat # Script to run the server
├── src/
│ ├── client/
│ │ ├── FileClient.java
│ │ └── protocol/
│ │ ├── ChunkData.java
│ │ └── Message.java
│ └── server/
│ ├── ActivityLogger.java
│ ├── ClientHandler.java
│ ├── FileManager.java
│ ├── FileMetadata.java
│ ├── FileRequest.java
│ ├── FileServer.java
│ ├── MessageStore.java
│ ├── RequestManager.java
│ ├── ServerConfig.java
│ ├── UploadBuffer.java
│ ├── UserMessage.java
│ └── UserRegistry.java
└── README.md
Server configuration can be modified in src/server/ServerConfig.java.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Java
- Inspired by basic file transfer protocols