-
-
Notifications
You must be signed in to change notification settings - Fork 7k
fix(VFileUpload): filter files based on accepted type if passed (#21150) #21158
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
Closed
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d4520fc
fix(VFileUpload): filter only accepted type on drop or browse
jcjp c6c308a
chore(VFileUpload): resolve lint errors
jcjp f131125
fix(VFileInput): filter only accepted type on drop or browse
jcjp 707cef6
chore(VFileUpload): resolve lint errors
jcjp ec6f93c
fix(VFileUpload): only filter if accept type is passed
jcjp 00bb9df
chore(VFileUpload): resolve lint errors
jcjp 3543401
feat(VFileUpload): move the check to useProxiedModel transformOut
jcjp 360d91e
fix(VFileUpload): lint and build errors
jcjp 06b5f47
chore(VFileUpload): remove duplicate variable
jcjp c0633bd
fix(VSelect): lint and build errors
jcjp b84dda7
fix(OutputInput): lint error reports
jcjp b88e766
feat(proxiedModal): accept optional event in parameters
jcjp 9333d52
fix(VFileInput): only dispatch if event is change or input
jcjp e0f8f68
chore(VFileUpload): merge branch master and resolve merge conflicts
jcjp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
File type will be dependent provided from the user, like in the example linked on this PR, but do let me know if it is worthwhile to add the suggestion of copilot thanks!
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.
support for
image/png, image/jpeg
or wildcardsimage/*
?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.
For this one it will depend on the type the that user set if no type was set it will return what was uploaded by default with no restriction.
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.
So what happens when user sets
accept="image/*"
and selects jpeg image withtype
ofimage/jpeg
that does not strictly match theaccept
attribute value... the file does not pass out of this function. None of the files get out when the user is using wildcards or even comma-separated list of types.