Skip to content

upload() should support 'webkitdirectory' without 'multiple' being set #1292

@andrewalderson

Description

@andrewalderson

Problem description

The upload method doesn't support 'webkitdirectory' unless 'multiple' is also set to true. This is not the expected behaviour as selecting a single directory does not require 'multiple' to be set on the input.

Suggested solution

The upload method line 34 .slice(0, input.multiple ? undefined : 1) should be changed to .slice(0, input.multiple || input.webkitdirectory ? undefined : 1).

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds assessmentThis needs to be looked at by a team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions