|
|
|
@ -7,7 +7,9 @@ const ImageFileInputForms = ({ fieldName, index, labelName, selectedFile, fileNa
|
|
|
|
|
const onChangeFile = (e) => {
|
|
|
|
|
const file = e.target.files[0];
|
|
|
|
|
if (file.type.includes('image')) {
|
|
|
|
|
alert.show(<img alt={`${file.name}`} style={{ maxWidth: '400px', margin: 'auto' }} src={URL.createObjectURL(file)} />);
|
|
|
|
|
alert.show(
|
|
|
|
|
<img alt={`${file.name}`} style={{ maxWidth: '400px', maxHeight: '400px', margin: 'auto' }} src={URL.createObjectURL(file)} />
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
handleChangeFile(e);
|
|
|
|
|
};
|
|
|
|
|