title: Meteor file upload not working
body: <p>I'm trying to upload images via Meteors CollectionFS but I'm not getting any errors in the client side code so I'm not sure what's broken. I see the console.log message "inside upload" but I don't see any success or fail messages from the Images.insert callback. Help.</p>
  
  <p><code>myproject/client/upload.html</code></p>
  
  <pre><code>&lt;template name="upload"&gt;
    &lt;form&gt;
    &lt;input class="upload" type="file" id="upload" name=".../"&gt;
    &lt;/form&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p><code>myproject/client/upload.js</code></p>
  
  <pre><code>Template.providerblock.events({
    'click .upload': function(event, template) {
      event.preventDefault();
      var photo =  $('#upload')[0];
      var file = photo.files[0];
      console.log("inside upload");
      Images.insert(file, function (err, fileObj) {
        if(err) {
          console.log("unable to upload file");
        } else {
          console.log("file upload success");
        }
      });
    },
  });
  </code></pre>
  
  <p><code>myproject/lib/images.js</code></p>
  
  <pre><code>var Images = new FS.Collection("images", {
    stores: [new FS.Store.FileSystem("images", {path: "~/uploads"})]
  });
  
  Images.allow({
    insert: function() {
      return true;
    },
    update: function() {
      return true;
    },
    remove: function() {
      return true;
    },
    download: function() {
      return true;
    }
  });
  </code></pre>