Skip to content

Adding a file manually bypasses the acceptedFiles check #377

Open
@BrianBrenner

Description

@BrianBrenner

In my case, I have acceptedFiles set to '.json' in the dropzoneOptions but I can still manually add a file by doing:

const myfile = new File([{}], 'test.txt', {type:'text/plain'})
$vm0.$refs.projectDropzone.manuallyAddFile(myfile)

I'm not sure if a user could ever do this, but I've been trying to write tests for my component by adding a file manually and this makes it impossible to check whether it triggers an error when adding an incorrect file type.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions