mongodb/node-mongodb-native — pull request #1152 by vsivsi (2014-03-12 01:35:56+00:00)
Title: GridStore drops passed `aliases` option, always results in `null` value in GridFS files

The GridFS data model allows for an array of strings containing alternate names called `aliases` to be attached to each file. GridStore already contains code to create this field in the `buildMongoObject()` function.

However, unlike the `metadata` field, which is correctly copied from `options` to `self` in preparation for calling `buildMongoObject()`, `aliases` is not copied over and this results in `aliases` always being `null` in GridStore created files, regardless of the value provided in the `options` object.

This pull request fixes this issue by treating `aliases` identically to how `metadata` is treated.

This issue also exists in the 1.4 branch, I'd be happy to send a pull request for that branch as well (the fixes are identical).