Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't upload another image after I upload a first one #283

Open
kodekaboom opened this issue Oct 28, 2021 · 1 comment
Open

I can't upload another image after I upload a first one #283

kodekaboom opened this issue Oct 28, 2021 · 1 comment
Labels

Comments

@kodekaboom
Copy link

Hi, after I complete the whole process to upload a picture, If I tried to add a new image, doesn't add the other image. shows up the modal, I can select the image, I click the Add button but doesn't work, thanks

the widget configuration
image
part of the code
` const widgetApi = useRef();

const openDialog = () => {
if (widgetApi.current) {
widgetApi.current.openDialog();
}
};

const onFileSelect = async (selectedFiles) => {
if (selectedFiles) {
const files = selectedFiles.files();

  files.map((file) => {
    file.progress(() => {
      setIsLoading(true);
    });

    file.done((info) => {
      fetch(info.cdnUrl).then((res) => res.blob()).then((blob) => {
        // uploading blob to storage

      }).catch((error) => {
        console.error(error);
        setIsLoading(false);
      });
    });
  });
}

};
`

  • Library version:1.3.2
  • Language/framework version: React
  • OS version: Ubuntu
@kodekaboom kodekaboom added the bug label Oct 28, 2021
@nd0ut
Copy link
Member

nd0ut commented Mar 11, 2022

@kodekaboom Looks like you forgot to set multiple prop to true. It's single mode by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants