Skip to content

[Request] Add support for db in GridFS functions #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Pk13055 opened this issue Dec 4, 2019 · 0 comments · Fixed by #178
Closed

[Request] Add support for db in GridFS functions #139

Pk13055 opened this issue Dec 4, 2019 · 0 comments · Fixed by #178

Comments

@Pk13055
Copy link

Pk13055 commented Dec 4, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant