I have searched the method and found that GridFS might help. I refer the tutorial as below:
http://api.mongodb.com/python/current/examples/gridfs.html
But there is one problem, I dont know how to insert the local address to the code. It means that I would like to specify the local address of a pdf file and upload it to the database, but I dont know how to do it.
I also try to add the address of file into "put()" as:
a = fs.put("C:myfile.pdf")
But it doesnt work, if you know the answer, please let me know.