Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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