Skip to content
This repository has been archived by the owner on Mar 14, 2019. It is now read-only.

How to: Update existing file's metadata

Philipp edited this page Mar 1, 2015 · 1 revision

Knowing the file's _id, you can call update on the FS.Collection instance:

myFSCollection.update({_id: fileId}, {$set: {'metadata.foo': 'bar'}});

If you have the FS.File instance, you can call update on it:

myFsFile.update({$set: {'metadata.foo': 'bar'}});