title: Element UI file upload compare filetype
body: <p>It should only allow png, jpg, jpeg, bmp file type.</p>
  
  <p>How can we do that using element ui <strong><code>vuejs</code></strong></p>
  
  <pre><code>beforeAvatarUpload(file) {
      const isJPG = file.type === 'image/jpeg' || 'image/png';
      const isLt2M = file.size / 1024 / 1024 &lt; 2;
  
      if (!isJPG) {
          this.$message.error('Avatar picture must be JPG format!');
      }
  
      if (!isLt2M) {
          this.$message.error('Avatar picture size can not exceed 2MB!');
      }
  
      return isJPG &amp;&amp; isLt2M;
  }
  </code></pre>
  
  <p>Does not work for me. Also it does not display me msword type in windows system. Don't know why 
  <br><br> Please guide <br> Thanks</p>