reactjsuploadchatantd

How to remove uploaded list to display in antd Upload?


I am using upload component in my chat application to allow user to upload their picture in chat room. But after uploading the picture the name of file display in bottom and i want to disappear it but i couldn't. It has a showUploadList attribute but when i set it false, it doesn't work.

 <Upload
   action={`${url}api/v1/chat/messages/${chatID}`}
   name="billig"
   headers={{ Authorization: `Token ${token}` }}
   onChange={this.onChange}
   fileList={this.state.fileList}
   multiple="true"
   accept=".png,.jpeg"
   showUploadList="false">

picture1 : before upload picture2 : after upload


Solution

  • Use

    showUploadList={false}

    instead of

    showUploadList="false"