aws-amplify / amplify-ui

Amplify UI is a collection of accessible, themeable, performant React (and more!) components that can connect directly to the cloud.
https://ui.docs.amplify.aws
Apache License 2.0
913 stars 295 forks source link

chore: fix issue where drag and drop throws illegal invocation #6145

Closed dindjarinjs closed 3 days ago

dindjarinjs commented 3 days ago

Description of changes

Fixes an issue where dropping a file in the dropzone results in the following error message: CleanShot 2024-11-18 at 12 36 27

This error is due to the webkitGetAsEntry method being destructured off the DataTransferItem, resulting it not being able to act on the item. Fix is to stop destructuring properties off of the DataTransferItem.

Issue #, if available

Description of how you validated changes

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

changeset-bot[bot] commented 3 days ago

🦋 Changeset detected

Latest commit: d04130231f168d8f56767a6fd68517585c4f848a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages | Name | Type | | ---------------------------------------- | ----- | | @aws-amplify/ui-react-core | Patch | | @aws-amplify/ui-react-auth | Patch | | @aws-amplify/ui-react-core-auth | Patch | | @aws-amplify/ui-react-core-notifications | Patch | | @aws-amplify/ui-react-geo | Patch | | @aws-amplify/ui-react-native | Patch | | @aws-amplify/ui-react-notifications | Patch | | @aws-amplify/ui-react-storage | Patch | | @aws-amplify/ui-react | Patch | | @aws-amplify/ui-react-native-auth | Patch | | @aws-amplify/ui-react-liveness | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

haverchuck commented 3 days ago

Approving, assuming that we tested that folder structure is maintained upon parsing and upload when drag/dropping a directory.