I want to store a PDF file in my MongoDB database (In Ubuntu) with with PYMonbgo and gridfs. But I am receiving the error 'utf-8' codec can't decode byte 0xe2 in position 10: invalid continuation byte
How can I store and receive a PDF with python in MongoDB?
from pymongo import MongoClient
import gridfs
db = MongoClient('mongodb://localhost:27017/').myDB
fs = gridfs.GridFS( db )
fileID = fs.put( open(('Test.pdf') ))
out = fs.get(fileID)