gridform icon indicating copy to clipboard operation
gridform copied to clipboard

Enable passing existing Grid instance to gridform

Open LewisJEllis opened this issue 11 years ago • 1 comments

I'm using gridform, and also using gridfs-stream itself. I have an existing Grid instance which I would like to be able to pass to gridform, but instead I have to pass the same db and mongo that I used to construct my Grid instance, and then gridform constructs its own Grid instance.

I've poked around a bit in both gridform and gridfs-stream and can't come up with any reason for gridform to need its own Grid instance. I'm happy to send a PR for this, but just want to have some discussion before doing so. I'm imagining just adding a grid field to options which, when provided, is used in place of db and mongo to populate __gridstream. Please let me know your thoughts.

LewisJEllis avatar Nov 18 '14 18:11 LewisJEllis

Yeah, that seems reasonable to me.

Awk34 avatar Dec 17 '14 20:12 Awk34