Skip to content

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

Open
@hanna-becker

Description

@hanna-becker

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions