title: Get Base64 String of Ant Design Multi Upload list
body: <p>Hi im making a multi upload files button with Ant Design. My goal is update state <strong>fileList</strong> with the list of file and convert <strong>originFileObj</strong> into base64 string. The problem is my function only returns one base64 string for all files in <strong>fileList</strong>. Here is my code:</p>
  
  <pre><code>import React from 'react';
  import { Upload } from 'antd';
  
  export default class MultiUpload extends React.Component {
    constructor(props: any) {
      super(props);
      this.state = {
        fileList: []
      };
      this.handleUpload = this.handleUpload.bind(this);
    }
  
    handleUpload =  (info: any) =&gt; {
      let fileList = [...info.fileList];
      // Accept 5 files only
      fileList = fileList.slice(-5);
      fileList.forEach(function(file, index) {
        let reader = new FileReader();
        reader.onload = (e) =&gt; {
           file.base64 =  e.target.result;
        };
        reader.readAsDataURL(info.file.originFileObj);
      });
      this.setState({fileList: fileList});
    };
  
    componentDidUpdate(prevProps, prevState) {
      console.log(this.state)
    }
  
    render() {
      return (
        &lt;div&gt;
          &lt;Upload
            listType={"text"}
            multiple={true}
            onChange={this.handleUpload}
          &gt;
            &lt;button &gt;
              Upload
            &lt;/button&gt;
          &lt;/Upload&gt;
        &lt;/div&gt;
      )
    }
  };
  </code></pre>