Scan and Upload Documents in Web TWAIN and Go


Download and Installation

Creating a Web Server in Go

Create a file server.go, and open it in your editor. Add the main function:

func main() {
	http.HandleFunc("/", handFile) // loading Web resources
	http.HandleFunc("/upload", uploadHandler) // receiving uploaded files
	http.ListenAndServe(":2014", nil) // port number
  • The function handFile is used to load Web resources (HTML, CSS and etc.).
  • The function uploadHandler is used to receive the uploaded images.
  • 2014 is the port number.


Subscribe Newsletter

Subscribe to our mailing list to get the monthly update.