Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot accept files without an extension #48

Open
Enet4 opened this issue Jun 23, 2023 · 1 comment
Open

Cannot accept files without an extension #48

Enet4 opened this issue Jun 23, 2023 · 1 comment

Comments

@Enet4
Copy link

Enet4 commented Jun 23, 2023

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?

@andreyna1808
Copy link

@Enet4 I don't think so, because I tried with xls and it didn't work either. I guess library support is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants