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

Feature request: Pass in accept as argument to openFileSelector() #291

Open
hanna-becker opened this issue Jul 7, 2023 · 0 comments
Open

Comments

@hanna-becker
Copy link

hanna-becker commented Jul 7, 2023

Hey there, great work on this library!

It would be awesome if we could pass "accept" to openFileSelector(), additionally to configuring it for the drop zone.

Use case: I have a drop zone for a whiteboard canvas, where users can drop audio and image files. I want the drop zone to accept file types of both categories, which is already possible with the current way "accept" works. Additionally, there is a side-navigation with different icon buttons to add items to the canvas, including one button for audio upload and another for image upload. For these buttons, I want to call openFileSelector() with the respective category of files (audio or image files respectively), so that it's already filtering the correct file types for the user in the file explorer.

I notice that right now the drop zone configuration applies to openFileSelector(), but I would like to be able to have it more granular there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant