We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Handling multiple files with the widget in react
The onchange method provides the fielGroup info which had a cdn for home files. How do I get each files cdn?
The text was updated successfully, but these errors were encountered:
You can use the onFileSelect method instead. It provides a group instance from which you can extract individual file URLs.
onFileSelect
const Example = () => { return ( <div> <Widget publicKey="demopublickey" multiple onFileSelect={async (group) => { const files = await Promise.all(group.files()); const urls = files.map((file) => file.cdnUrl); console.log(urls); }} /> </div> ); }; ReactDom.render(<Example />, document.querySelector("#app"));
Here's a demo on Codesandbox.
Sorry, something went wrong.
No branches or pull requests
Question
Handling multiple files with the widget in react
The onchange method provides the fielGroup info which had a cdn for home files. How do I get each files cdn?
The text was updated successfully, but these errors were encountered: