mycode
<Typography id="modal-modal-description" sx={{ mt: 2 }} onClick={()=>fileInput.current.click()}> <img src={Gallery} style={{ height:'4vh',width:'4vw'}} /> <span >Upload from Gallery</span> <input type="file" ref={fileInput} accept='.jpg,.jpeg,.png' name="file" style={{display:'none'}} onChange={handleFileChange}/> </Typography> 5:46 Gaurav pandey const handleFileChange = (e) => { const file = e.target.files[0]; console.log(file); setSelectedFile(file); handleUpload(file); // const imageUrl = URL.createObjectURL(file); // setPicture(imageUrl); setOpen(false); }; ...