mongodb-labs / flask-pymongo

PyMongo support for Flask applications

Repository from Github https://github.commongodb-labs/flask-pymongoRepository from Github https://github.commongodb-labs/flask-pymongo

[Request] Add support for `db` in GridFS functions

Pk13055 opened this issue · comments

The addition of an optional database param in the gridFS functions would be quite helpful for multi-db based applications.

I guess a simple addition of db :str=None on this line would be enough; with changes to this line from:

storage = GridFS(self.db, base)

to:

storage = GridFS(self.cx[db] if db else self.db, base)

Similar changes would be needed in the save_file function here