I'm reading GridFS's docs and I'm not sure I'm understanding it. It says right here https://github.com/mongodb/node-mongodb-native/blob/1.4/examples/gridfs.js#L75 that I should delete a file using it's name.
But that's just both insane and stupid. Two files with the same name can coexist perfectly inside the same collection by having different _id
.
There should be a way to delete files by their _id
instead of by their name, but I can't find it.
My question is: has anybody delete files from GridFS using ids instead of names? How?