# go上传 **Repository Path**: yanhcc/go-upload ## Basic Information - **Project Name**: go上传 - **Description**: go简易上传 - **Primary Language**: Go - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-23 - **Last Updated**: 2025-10-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Go File Upload Project This project is a simple file upload server built with Go. It allows users to upload files to the server and provides links for downloading the uploaded files. ## Project Structure ``` go-file-upload ├── cmd │ └── server │ └── main.go # Entry point of the application ├── internal │ ├── server │ │ ├── server.go # HTTP server implementation │ │ └── handlers.go # HTTP handlers for upload and download │ └── storage │ ├── store.go # Storage interface for file operations │ └── local.go # Local file storage implementation ├── pkg │ └── config │ └── config.go # Configuration settings loader ├── web │ ├── templates │ │ ├── index.html # Upload page template │ │ └── download.html # Download page template │ └── static │ └── css │ └── style.css # CSS styles for the web application ├── configs │ └── config.yaml # Configuration settings in YAML format ├── uploads # Directory for storing uploaded files ├── go.mod # Module definition and dependencies ├── go.sum # Checksums for module dependencies ├── Dockerfile # Instructions to build a Docker image └── README.md # Project documentation ``` ## Setup Instructions 1. **Clone the repository:** ``` git clone cd go-file-upload ``` 2. **Install dependencies:** ``` go mod tidy ``` 3. **Configure the application:** Edit the `configs/config.yaml` file to set the desired server port and upload directory. 4. **Run the application:** ``` go run cmd/server/main.go ``` 5. **Access the upload page:** Open your web browser and navigate to `http://localhost:` (replace `` with the port specified in the config). ## Usage - Use the upload form on the main page to select and upload files. - After uploading, you will receive a link to download the uploaded file. ## License This project is licensed under the MIT License. See the LICENSE file for more details.