Hello
I am working on a go project where I need to serve files stored in mongodb. The files are stored in a GridFs. I use gopkg.in/mgo.v2 as package to connect and query the db.
I can retrieve the file from the db, that is not hard.
f, err := s.files.OpenId(id)
But how can I serve that file with http? I work with the Julien Schmidt router to handle all the other restfull requests. The solutions I find always use static files, not files from a db.
Github:
github repo
Thanks in advance