You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is someone able to deliver an example to upload multiple files to cloudinary with react-dropzone-uploader ??? It's something that can't be found anywhere.
importReactfrom"react";import"react-dropzone-uploader/dist/styles.css";importDropzonefrom"react-dropzone-uploader";constImagesUploader=()=>{// specify upload params and url for your filesconstgetUploadParams=({ file })=>{constbody=newFormData();body.append("file",file);body.append("upload_preset",{preset-name});body.append("api_key",{api-key});return{url: "https://api.cloudinary.com/v1_1/{cloud-name}/image/upload", body };}// called every time a file's `status` changesconsthandleChangeStatus=({ meta, file },status)=>{console.log(status,meta,file)}// receives array of files that are done uploading when submit button is clickedconsthandleSubmit=(files,allFiles)=>{console.log(files.map(f=>f.meta))allFiles.forEach(f=>f.remove())}return(<DropzoneonChangeStatus={handleChangeStatus}onSubmit={handleSubmit}multiple={true}inputContent="Add images"inputWithFilesContent="More"submitButtonContent="Save images"/>);};exportdefaultImagesUploader;
Something like that for example. This one is not working but maybe someone can correct it?
The text was updated successfully, but these errors were encountered:
Hello,
Is someone able to deliver an example to upload multiple files to cloudinary with react-dropzone-uploader ??? It's something that can't be found anywhere.
Something like that for example. This one is not working but maybe someone can correct it?
The text was updated successfully, but these errors were encountered: