FileUpload customUpload does NOT clear the file selected

UI Components for React
Post Reply
amendis
Posts: 1
Joined: 10 May 2021, 08:46

10 May 2021, 09:08

I have FileUpload component like this

Code: Select all

<FileUpload
                            mode="basic"
                            name="baptism_certificate"
                            accept="image/*"
                            customUpload
                            uploadHandler={onBaptismCertificateUploadAuto}
                            chooseLabel="Browse"
                            maxFileSize={1000000}
                          />
This is my

Code: Select all

onBaptismCertificateUploadAuto 
method

Code: Select all

 const onBaptismCertificateUploadAuto = ({ files }) => {
    const [file] = files;
    dispatch(uploadParishionerBaptismCertificate(parishioner.id, file));
  };

Image is successfully uploading BUT file name stays same. and Old file is still attached to button.
See below screenshow
https://tinyurl.com/yzel7wgx
Button name should change to "Browse" and I should be able to select new image

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

14 Jun 2021, 16:49

Hi,

Could you please try it with the latest PrimeReact version?

Best Regards,

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 18 guests