title: Creating a Parse.File Object
body: <p>Loving parse at the moment just cant seem to upload a file to parse using the javascript api (client side), the issue is I can't seem to create a parse object. The following is my code:</p>
  
  <pre><code>var fileUploadControl = $("#imgInp")[0];
  var file = fileUploadControl.files[0];
  var name = "photo.jpg";
  var parseFile = new Parse.File(name, file);
  
  parseFile.save().then(function() {
  // etc
  </code></pre>
  
  <p>The Error I'm getting from the console on chrome is </p>
  
  <pre><code>TypeError: undefined is not a function
  at k.$scope.submitReport
  (file:///Users/xxx/Documents/projects/script.js:402:27) &lt;- the line which has  var parseFile = new Parse.File(name, file); on it
  </code></pre>
  
  <p>Could anybody shed some light on this bizarre situation (I'm fairly certain I'm following the documentation to the letter.</p>
  
  <p><a href="https://parse.com/docs/js_guide#files-classes" rel="nofollow">https://parse.com/docs/js_guide#files-classes</a></p>