Streaming Images from MongoDB using Golang

Photo by Suganth on Unsplash

Recently I had a client that has a fairly large image library stored in MongoDB using GridFS. I was building them an application which provided an interface between their front-end website and their new back-office system, which provides accounting services among other things. Part of this application needed to retrieve images from this MongoDB system and stream them to the browser so their front-end website could…