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?