Code: Select all
<FileUpload
mode="basic"
name="baptism_certificate"
accept="image/*"
customUpload
uploadHandler={onBaptismCertificateUploadAuto}
chooseLabel="Browse"
maxFileSize={1000000}
/>
Code: Select all
onBaptismCertificateUploadAuto
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