Mositafan
Mositafan

Reputation: 43

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

Upvotes: 4

Views: 10137

Answers (1)

user15503802
user15503802

Reputation: 116

Use

showUploadList={false}

instead of

showUploadList="false"

Upvotes: 10

Related Questions