Skip to content

Cannot accept files without an extension #48

@Enet4

Description

@Enet4

I was trying out this component to drop DICOM files. While they are typically associated with the .dcm extension, it is also common for the files not to specify an extension at all (e.g. the file name being just I_00001). In these cases, while the media type is still application/dicom, they will not show up on the file upload form when accepting only this type, and even when selecting them here or dropping them
to the drop zone, they will be always excluded with the error "I_00001 is not a valid file type" (code 1) if they do not have an extension.

<Files
    onChange={handleChange}
    onError={handleError}
    accepts={['application/dicom']}
    maxFileSize={100_000_000}
    clickable>
        Drop files here or click to upload
</Files>

I tried several combinations of accepts, including '*/*', '', '.*', '*.*', and '*', but none of them worked. Is there something that can be done to work around this? Or are changes to the library necessary to support this?

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