title: Meteor and filepicker-plus package
body: <p>I am having a little bit of trouble outputting a image after a filepicker selection with the <a href="https://atmospherejs.com/natestrauser/filepicker-plus" rel="nofollow">file picker plus package</a> from meteor. How to I grab the uploaded image url or file path, so I can pass it into a form input and put it in a collection. Putting in into the collection isnt the part I am worried about its getting the path that I am having trouble with cheers.</p>
  
  <p>All contained in postSubmit template.</p>
  
  <p>I have a form with </p>
  
  <pre><code>&lt;input type="filepicker" name="myName" /&gt;
  </code></pre>
  
  <p>and a img output in the same template </p>
  
  <pre><code>  &lt;img src="{{filepickerIdToUrl myName}}"&gt;
  </code></pre>
  
  <p>and a router file containg</p>
  
  <pre><code>     Router.onBeforeAction(function(){
      loadFilePicker('magickey');
     //can leave out key if its in settings
     this.next();
  
  },{only:['postSubmit']});
  </code></pre>
  
  <p>Here is the full postSubmit template</p>
  
  <pre><code>&lt;template name="postSubmit"&gt;
    &lt;form&gt;
        &lt;label for="title"&gt;Title&lt;/label&gt;
        &lt;input name="title" id="title" type="text" value="" placeholder="Name your post"/&gt;
        &lt;button id="uploadImage" class="btn btn-info btn-sm"&gt;&lt;i class="fa fa-upload"&gt;&lt;/i&gt; Upload&lt;/button&gt;
        &lt;input type="submit" value="Submit"/&gt;
    &lt;/form&gt;
      &lt;img id="imagePreview" class="img-responsive" src="{{filepickerIdToImageUrl imageId placehold_it='500x350' h=200 w=300}}"/&gt;
                      &lt;button id="removeImage" class="btn btn-warning btn-sm"&gt;&lt;i class="fa fa-trash-o"&gt;&lt;/i&gt; Remove&lt;/button&gt;
  </code></pre>
  
  <p></p>
  
  <p>This is also my postSubmit events</p>
  
  <pre><code>Template.postSubmit.events({
    'submit form': function(e) {
      e.preventDefault();
  
      var post = {
        title: $(e.target).find('[name=title]').val(),
        image: $(e.target).find('[name=image]').val()
  
      };
  
      Meteor.call('postInsert', post, function(error, result) {
        // display the error to the user and abort
        if (error)
          return alert(error.reason);
  
        Router.go('postPage', {_id: result._id});
      });
    }
  });
  </code></pre>