I am using pymongo to store user comments in my Django project. I need to save comment images to the database and then show it on a page which is generated by a Django template,
but when I use request.FILES.get (...), read(...), the line does not save in Mongo, because it is not encoded in utf-8.
How can I properly save an image into mongoDB and then show on an HTML page?
You can try and use this api section: http://api.mongodb.org/python/2.2.1/api/bson/binary.html
Wrap it inside of this object and then try and insert/save it.
Disclaimer: I have never programmed python so I might be talking jibberish about the wrapping part, either way that page should tell you how to do it.