Created
June 7, 2023 11:41
-
-
Save mohammad-mghn/85bb25b06e620ea2d64598c0b3c88b2d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const [cover, setCover] = useState<any>(); // paste this in tour component route | |
<FilePond | |
files={cover} | |
chunkUploads={true} | |
onupdatefiles={setCover} | |
server={{ | |
process: { | |
url: <COULDINARY_API_UPLOAD_IMAGE>, | |
onerror: (error: any) => { | |
console.log(error); | |
}, | |
ondata: (data: any) => { | |
data.append("file", cover[0]?.file); | |
data.append("could_name", <COULDINARY_NAME>); | |
data.append("upload_preset", <YOUR_CLOUDNIRY_NAME>); | |
return data; | |
}, | |
}, | |
}} | |
allowMultiple={false} | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment