title: Ant Design Upload get file content
body: <p>I am using the Ant Design Upload component. Is there a way I can get the content of the selected file as a string in JavaScript in order to display it on the page?</p>
  
  <p>Ideally, I would like to access <code>file.data</code> or something.</p>
  
  <pre><code>&lt;Upload
      accept=".txt, .csv"
      showUploadList={false}
      beforeUpload={(file, fileList) =&gt; {
          // Access file content here and do something with it
          console.log(file);
  
          // Prevent upload
          return false;
      }}
  &gt;
      &lt;Button&gt;
          &lt;Icon type="upload" /&gt; Click to Upload
      &lt;/Button&gt;
  &lt;/Upload&gt;
  </code></pre>