Scan and Upload Documents in Web TWAIN and Go

Last Updated on 2018-10-08


Download and Installation

Creating a Web Server in Go

Create a file server.go, and open it in your editor. Add the main function:
[javascript]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.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe Newsletter

Subscribe to our mailing list to get the monthly update.