raix/Meteor-CollectionFS — pull request #36 by nhibner (2013-04-21 07:18:59+00:00)
Title: Option for file encoding

The current implementation uses 'utf8' as the default when reading/writing node buffers. However, I wanted to store images taken from a canvas element via canvas.toDataURL(), which returns a base64 encoded png as a data URL. I use a Meteor method to pass the URL to the server, which stores it using storeBuffer. If there is a better way of doing this, please let me know.

Note that I have only tested encoding files with utf-8 and base64. I am not sure what limitations other encodings may encounter.