Skip to content

bini-x/go-file-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go File Download Server

A simple web server built in Go that serves file downloads via HTTP.

Features

  • HTTP file server with download endpoints
  • Custom download headers for forced file download
  • Cross-platform compatibility
  • Simple and lightweight

Usage

  1. Clone the repository:
git clone https://github.com/bini-x/go-file-server.git
  1. Run the server: go run main.go

  2. Go to http://localhost:8080 or if you want to send a file from your pc(laptop) to your mobile phone or other pcs on the same network, open your browser on the device in which you want to download the file and type "http://[ipAddress]:8080/", where [ipAddress] is the ip address of the pc in which the server is running.

  3. Click the link to download the file.

If you want to download another file, add it to this folder and then change the code parts where is "example.pdf". If you also change the file format (.jpeg, .mp4...), make sure to change the "application/pdf" part to the correct content-type.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published