title: How to store the uploaded value into redux store
body: <p>Hi i am working on upload file by using react and redux and ant design for the designing page. I am able to successfully send the selected file to the backend and also able to store into database.Now in response i return some file metadata which i need to store in the redux store.</p>
  
  <p>Now the problem is when i go to the next page and come back on the previous page i am calling the redux to store the complete form field into redux store.
  so now for my upload filed it get updated with some object which content file and filelist, instead i want to save response metadata which i am returning from backend.</p>
  
  <p>I have tried to assignee my upload field with the response metadata but when i go back and forth it get override with some object which content file and filelist.
  So i am not able to figure it out what wrong i am doing. Can any one help me on  these</p>
  
  <p><strong>A.js file:</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>import React, { Component } from 'react'
  import uploadFile from './B'
  import { Button, Form, Icon, Upload } from "antd";
  
  
  export class A extends Component {
      uploadFileHandler = ({ file, onSuccess }) =&gt; {
          uploadFile(file, onSuccess).then(data =&gt; {
              this.props.updateProjectReport({
                  projectReport: data
              });
          });
      };
  
      render() {
          const { getFieldDecorator } = this.props.form;
          return (
              &lt;Form.Item&gt;
                  &lt;br /&gt;
                  {getFieldDecorator("projectReport", {
                      initialValue: this.props.project.projectReport
                  })(
                      &lt;Upload name="file" customRequest={this.uploadFileHandler}&gt;
                          &lt;Button&gt;
                              &lt;Icon type="upload" /&gt; Click to Upload
                          &lt;/Button&gt;
                      &lt;/Upload&gt;
                  )}
              &lt;/Form.Item&gt;
          )
      }
  }
  
  export default A
  </code></pre>
  
  <p><strong>B.js file:</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>import axios from "axios";
  
  const uploadFile = (props, onSuccess) =&gt; {
      let fileDetails;
      console.log("upload file call");
      const data = new FormData();
      data.append("fileName", props);
      const config = {
        headers: {
          "content-type":
            "multipart/form-data; boundary=----WebKitFormBoundaryqTqJIxvkWFYqvP5s"
        }
      };
      return axios
        .post("http://localhost:8080/upload", data, config)
        .then(resp =&gt; {
          if (resp.status === 200) {
            setTimeout(() =&gt; {
              onSuccess("ok");
            }, 0);
            fileDetails = resp.data;
            console.log(fileDetails);
                return fileDetails;
          }
        })
        .catch(error =&gt; {
          console.log(error);
        });
    };
  
  export default uploadFile;
  
  </code></pre>
  
  <p>This is the data get save when i go back and forth in the reducer.</p>
  
  <pre><code>projectReport: {
          file: {
            uid: 'rc-upload-1567617261814-3',
            lastModified: 1565243029823,
            lastModifiedDate: '2019-08-08T05:43:49.823Z',
            name: 'rose-blue-flower-rose-blooms-67636.jpeg',
            size: 20775,
            type: 'image/jpeg',
            percent: 0,
            originFileObj: {
              uid: 'rc-upload-1567617261814-3'
            },
            status: 'done',
            response: 'ok'
          },
          fileList: [
            {
              uid: 'rc-upload-1567617261814-3',
              lastModified: 1565243029823,
              lastModifiedDate: '2019-08-08T05:43:49.823Z',
              name: 'rose-blue-flower-rose-blooms-67636.jpeg',
              size: 20775,
              type: 'image/jpeg',
              percent: 0,
              originFileObj: {
                uid: 'rc-upload-1567617261814-3'
              },
              status: 'done',
              response: 'ok'
            }
          ]
        }
  </code></pre>
  
  <p>Expected Json to be Store :</p>
  
  <pre><code>projectReport: {
          fileName: "rose-blue-flower-rose-blooms-67636.jpeg", 
          fileDownLoadUri: "http://localhost:8080/downloadFile/rose-blue-flower-rose-blooms-67636.jpeg", 
          fileContentType: "image/jpeg", 
          fileSize: 20775
        }
  </code></pre>