5👍
✅
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.
1👍
Have you tried GridFS? It’s a great tool for storing binary data like images in a database.
Source:stackexchange.com