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

allowedExtensions fails #25

Open
mg-i-car-sor opened this issue Apr 7, 2023 · 2 comments
Open

allowedExtensions fails #25

mg-i-car-sor opened this issue Apr 7, 2023 · 2 comments

Comments

@mg-i-car-sor
Copy link

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.

@mg-i-car-sor
Copy link
Author

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.

@larvata
Copy link

larvata commented Apr 23, 2023

version 0.5.2 works as expected

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