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

fix: check the file type being uploaded before performing upload #2584

Merged
merged 12 commits into from
Jul 27, 2023

Conversation

musale
Copy link
Contributor

@musale musale commented Jul 4, 2023

Closes #2581

PR Type

  • Bugfix

Description of the changes

Checks the file type form the iterators of DataTransferItemList | FileList.

PR checklist

  • Project builds (yarn build) and changes have been tested in at least two supported browsers (Edge + non-Chromium based browser)
  • All public APIs (classes, methods, etc) have been documented following the jsdoc syntax
  • Stories have been added and existing stories have been tested
  • Added appropriate documentation. Docs PR:
  • License header has been added to all new source files (yarn setLicense)
  • Contains NO breaking changes

Other information

@musale musale requested a review from a team as a code owner July 4, 2023 11:42
@ghost
Copy link

ghost commented Jul 4, 2023

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:

  • I have verified a documentation PR has been linked and is approved (or not applicable)
  • I have ran this PR locally and have tested the fix/feature
  • I have verified that stories have been added to storybook (or not applicable)
  • I have tested existing stories in storybook to verify no regression has occured
  • I have tested the solution in at least two browsers (Edge + 1 non-Chromium based browser)

@github-actions
Copy link

github-actions bot commented Jul 4, 2023

The updated storybook is available here

1 similar comment
@github-actions
Copy link

github-actions bot commented Jul 4, 2023

The updated storybook is available here

Mnickii
Mnickii previously approved these changes Jul 4, 2023
Copy link
Collaborator

@Mnickii Mnickii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great!

@github-actions
Copy link

github-actions bot commented Jul 5, 2023

The updated storybook is available here

@ghost ghost added the Needs: Author Feedback Issue needs response from issue author label Jul 5, 2023
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

The updated storybook is available here

@ghost ghost removed the Needs: Author Feedback Issue needs response from issue author label Jul 6, 2023
@github-actions
Copy link

The updated storybook is available here

@Mnickii Mnickii requested a review from gavinbarron July 14, 2023 12:10
@github-actions
Copy link

The updated storybook is available here

@github-actions
Copy link

The updated storybook is available here

@github-actions
Copy link

The updated storybook is available here

@musale musale added this to the 2023-07 milestone Jul 25, 2023
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]>
@github-actions
Copy link

The updated storybook is available here

1 similar comment
@github-actions
Copy link

The updated storybook is available here

@github-actions
Copy link

The updated storybook is available here

@gavinbarron gavinbarron enabled auto-merge (squash) July 27, 2023 15:58
@gavinbarron gavinbarron merged commit 7fb265c into main Jul 27, 2023
7 checks passed
@gavinbarron gavinbarron deleted the fix-file-upload-btn branch July 27, 2023 15:58
gavinbarron added a commit that referenced this pull request Aug 21, 2023
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG] mgt-file-list unable to upload files when using upload button
3 participants