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
first of all thank you for this nice package. I just wanted to report a small bug in your example that cost me some time to find. In order to spare other people from this I want to provide the fix.
Line 298: files.forEach(file => filesToStore.push(file)) does not work because files is an object of objects which cannot use forEach.
Replace this line with
Object.values(files).map((file) => filesToStore.push(file));
and everything works as expected.
Best regards
Marty
Edit: Not sure how linebreak works in a codeblock. Two spaces are not working.
The text was updated successfully, but these errors were encountered:
Hi,
first of all thank you for this nice package. I just wanted to report a small bug in your example that cost me some time to find. In order to spare other people from this I want to provide the fix.
In the last Section "Starting downloads manually"
customOnChangeHandler = (event) => { const { target: { files } } = event; const filesToStore = []; files.forEach(file => filesToStore.push(file)); this.setState({ files: filesToStore }); }
Line 298:
files.forEach(file => filesToStore.push(file))
does not work because files is an object of objects which cannot use forEach.Replace this line with
Object.values(files).map((file) => filesToStore.push(file));
and everything works as expected.
Best regards
Marty
Edit: Not sure how linebreak works in a codeblock. Two spaces are not working.
The text was updated successfully, but these errors were encountered: