raix/Meteor-CollectionFS — pull request #51 by aldeed (2013-07-10 22:56:27+00:00)
Title: Improvements and Fixes to built-in helpers, storeFiles, and acceptDropsOn

Hi @raix, more changes to merge. These are some improvements to the things you previously merged, plus fixes and improvements to the new example app, updated readme to list all the built-in handlebars helpers and other corrections, and added the "cfs" prefix we talked about to all the helpers. A lot of this will break anyone who's already using the helpers, but it doesn't change the way anything works in the core.

Still need to get around to adding some default filehandlers. Possibly next week. That will be about it for me. I'm looking forward to seeing the core rewrite when you're done.

One thing you might want to take a look at eventually: The `fileFilter()` method I added makes it simple to define content type, extension, and max file size filtering, but currently I'm only checking it (calling `fileIsAllowed()`) during execution of `storeFile()`, which is executed on the client. To be more foolproof, it should be called on the server, too. But I wasn't sure where the best place to do that would be. I guess the options would be somewhere before the data is actually transferred or somewhere after it's transferred, but there's the issue of the collection record, too. We don't want that created if the file ends up being disallowed, or we need to delete it if it was. `fileIsAllowed()` is common, so it should be simple to call it on the server side, just need to figure out the best place.