Skip to content

Enhancement: allowedContentTypes to match HTML5 input "accept" #499

@zbagley

Description

@zbagley

Description

Currently allowedContentTypes for input options only seems to accept very specific MIME types. The expected results would be that the allowedContentTypes array would match how a DOM <input accept="<allowedContentTypes>" performs.

Specific Issues

Noticed mismatch on:
blanket MIME types (image/*, audio/*)
specific extensions (.dae, .dxf)

Reproduction

Using the demo .ts and .html files, append options to include:

allowedContentTypes: ['image/*', '.dae']

This results in the input rejecting all image files and .dae extension files.

Append <input accept="image/*, .dae" /> and image files and .dae extensions are no longer rejected, but are the only files allowed to be selected for upload.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions