-
Notifications
You must be signed in to change notification settings - Fork 303
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
fix: check the file type being uploaded before performing upload #2584
Conversation
Signed-off-by: Martin Musale <[email protected]>
Thank you for creating a Pull Request @musale. This is a checklist for the PR reviewer(s) to complete before approving and merging this PR:
|
The updated storybook is available here |
1 similar comment
The updated storybook is available here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great!
The updated storybook is available here |
packages/mgt-components/src/components/mgt-file-list/mgt-file-upload/mgt-file-upload.ts
Outdated
Show resolved
Hide resolved
The updated storybook is available here |
The updated storybook is available here |
The updated storybook is available here |
The updated storybook is available here |
The updated storybook is available here |
This is by checking if the or instance methods are in the uploadFileItem object. Falsey value is cast to File type Signed-off-by: Martin Musale <[email protected]>
…soft-graph-toolkit into fix-file-upload-btn
…kit into fix-file-upload-btn
The updated storybook is available here |
1 similar comment
The updated storybook is available here |
The updated storybook is available here |
Check the file type being uploaded before performing upload use typeguards to properly narrow types for conditional logic --------- Signed-off-by: Martin Musale <[email protected]> Co-authored-by: Nickii Miaro <[email protected]> Co-authored-by: Gavin Barron <[email protected]>
Closes #2581
PR Type
Description of the changes
Checks the file type form the iterators of
DataTransferItemList | FileList
.PR checklist
yarn build
) and changes have been tested in at least two supported browsers (Edge + non-Chromium based browser)yarn setLicense
)Other information