I am trying this
username1 = "admin"
password = "password"
host = "localhost"
prefix = 'mongodb://' + username1 + ':'
suffix = '@' + host + ':27017/'
connString = prefix + urllib.quote(password) + suffix
db = MongoClient(connString)
fs = gridfs.GridFS(db)//getting error at this line
And the error is database must be an instance of database pymongo.
I am following this
Your help will be highly appreciated.
databasetoGridFSas shown in the example. Right now youdbis a database connection. Usedb = MongoClient(connString).my_collection