title: Issue On Getting Uploaded Image Name With Jquery
body: <p>I am trying to get the uploaded image name like this</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    $(function() {
      $("input[name=file]").on("change", function() {
        if (this.files &amp;&amp; this.files[0]) {
        var fimeName = $(this).val(files[0].name);
          console.log(fimeName);
         }
        });
      });
  
    </code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;input type="file" name="file" /&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>but it is not working and I am getting</p>
  
  <blockquote>
    <p>Uncaught ReferenceError: files is not defined</p>
  </blockquote>
  
  <p>Can you please let me know what I am doing wring? Thansk</p>