skip to Main Content

Javascript – Trying to load base 64 image in nextjs

I uploaded my image in this way and this method works, it uploads in a string: const [image, setImage] = useState(""); //------------------^^^^^^^^^^^^^^^^------------------------- const handleImage = (e) => { console.log("Handle image called"); const selectedFile = e.target.files[0]; console.log("Selected file:", selectedFile); if (selectedFile)…

VIEW QUESTION
Back To Top
Search