rouftom/react-mui-fileuploader

allowedExtensions fails

Opened this issue · 2 comments

Hi guy,
when allowedExtensions is assigned, the check of file's extensions fails.

<FileUpload id="file" title="" multiFile={false} maxFileSize={10} allowedExtensions={["docx", "pdf", "doc"]} errorSizeMessage={ "max 10Mb" } maxUploadFiles={1} showPlaceholderImage={false} onFilesChange={handleFilesChange} onContextReady={(context) => {}} />
If select a .docx file, this appen:
image
Best regards.

i looked at the code and noticed that it doesn't refer to the file extension but to the mimetype.
not
allowedExtensions={["docx", "doc"]}
but
allowedExtensions={[ "vnd.openxmlformats-officedocument.wordprocessingml.document" ]}
Can you correct the property name?
Best regards.

version 0.5.2 works as expected