title: How to stop React Ant Design Upload component from posting files automatically
body: <p>I have this simple file upload button that I got from antd <a href="https://ant.design/components/upload/" rel="nofollow noreferrer">ant design documentation</a>:</p>
  <pre><code>&lt;Upload&gt;
    &lt;Button
      icon={&lt;UploadOutlined /&gt;}
      className=&quot;upload-btn&quot;
    &gt;
       Upload a file
    &lt;/Button&gt;
  &lt;/Upload&gt;
  </code></pre>
  <p>Every time I upload a file I get this error in the console log:
  <a href="https://i.stack.imgur.com/lD7J2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lD7J2.png" alt="enter image description here" /></a></p>
  <p>I don't want it to make a post request when I upload the file, I have a submit button for that.</p>