title: How to remove all file uploaded with upload component of ant design
body: <p>Is there a way to delete all uploaded files at once? When I uploaded success. I want to call event remove all files. I didn't find any solution for this. Tks for all the help !</p>
  <h2>Here is my code:</h2>
  <ul>
  <li>upload file</li>
  </ul>
  <pre><code>
    const [fileDatas, setFileDatas] = useState([]);
    const dummyRequest = ({ file, onSuccess }) =&gt; {};
  
    const beforeUpload = (file, fileList) =&gt; {return false};
  
    const { Dragger } = Upload;
    const props = {
      accept: 'image/png, image/jpeg, image/svg, image/gif, .xlsx,.xls,image/*,.doc, .docx,.ppt, .pptx,.txt,.pdf',
      name: 'file',
      multiple: true,
      beforeUpload: beforeUpload,
      action: dummyRequest,
  
      onChange({ file, fileList }) {
        if (file.status !== 'uploading') {
          setFileUploads(fileList);
        }
      },
  
      onDrop(e) {
        console.log('Dropped files', e.dataTransfer.files);
        setFileUploads(e.dataTransfer.files);
      },
    };
  
  </code></pre>
  <ul>
  <li>handle event submit upload file</li>
  </ul>
  <pre><code>const handleUploadFile = () =&gt; {
      if (fileUploads.length === 0) {
        toastActionWarning('No files to upload');
      }else{
        setFileUploads([]);
        const formDatas = new FormData();
        fileUploads.forEach((file) =&gt; {
          formDatas.append(file.name, file.originFileObj);
        });
        axios
          .post('files', formDatas, { withCredentials: true })
          .then((res) =&gt; {
            let newList = [...fileDatas];
            res.data.data.forEach(element =&gt; {
              element.author = window.userDisplayName;
              newList = [element, ...newList]
            });
            setFileDatas(newList);
            //I  want to clear all file here
            toastActionSuccess('Upload successfully');
          })
          .catch((error) =&gt; {
            toastActionFailed('There was an error in processing');
          });
      }
    };
  </code></pre>
  <p><a href="https://i.stack.imgur.com/frH3W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/frH3W.png" alt="enter image description here" /></a></p>