Answers for "react-file-base64"

0

react-file-base64

import FileBase64 from "react-file-base64";
// FileBase64 <- use as component

<FileBase64 
	type="file"
    multiple={false} <- if want to upload multiple images set "true"
    onDone={} <- takes callback function
/>

// onDone return an object of: filename, fileType, base64 data
// use the setState or function of useState to grap the base64 data
Posted by: Guest on September-28-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language