Home > OS >  How to change the name of a GridFS bucket in python?
How to change the name of a GridFS bucket in python?

Time:02-12

I have been trying to figure out how to change the default name of a bucket while using GridFS in python. By default they look like,

fs.chunks
fs.files

I want them to look like,

custom.chunks
custom.files

Can anyone explain how to do it?

CodePudding user response:

I have figured it out, you just need to pass the name of the bucket with the argument. like this, if your desired name for the bucket is custom,

GridFS(db, "Custom")
  • Related