title: How do I tell the custom onSuccess function to stop the upload spinner in Ant Design Upload component?
body: <p>I have this code: </p>
  
  <pre><code>render() {
      const props = {
        onChange: this.handleChange,
        multiple: true,
        name: 'datafiles[]',
        defaultFileList: this.initialState.fileList,
        listType: "text",
        onSuccess: (resp, file, xhr) =&gt; {
          file.status = 'done';
          const newDatafile = {
            filename: file.name,
            s3ObjectKey: `${this.props.userId}/${this.props.datasetId}`,
            filesizeBytes: file.size
          }
          this.props.saveNewDatafile(newDatafile, (saveError, savedJob) =&gt; {
              //Yadda yadda
          })
        },
        showUploadList: {
          showPreviewIcon: true,
          showRemoveIcon: true
        },
        customRequest: customRequest
      };
  </code></pre>
  
  <p>As you can see, I am using the <code>customRequest</code>. If I don't pass the <code>onSuccess</code> function, then the component works properly on success. But when I pass it, the progress bar reaches the end, but it still shows the spinner as if it was still uploading. </p>
  
  <p><a href="https://i.stack.imgur.com/md1k0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/md1k0.png" alt="pesky spinner before the filename"></a>
  Pesky spinner before the filename</p>
  
  <p>How do I tell the Upload component that the upload finished? I tried with the <code>file.status = 'done'</code> in a sad attempt to fix it, but no luck. I need the custom <code>onSuccess</code> function so I can call the <code>saveNewDatafile</code> function.</p>