vutoan266 / react-images-uploading

The simple images uploader applied Render Props pattern that allows you to fully control UI component and behaviors.
https://github.com/vutoan266/react-images-uploading
MIT License
320 stars 52 forks source link

acceptType is case sensitive #60

Closed AviKKi closed 4 years ago

AviKKi commented 4 years ago

acceptType attribute is case sensitive, which is a bit bad user experience for users who upload files with extension JPG or PNG.

A quick fix is to include uppercase extensions, like

acceptType={['jpg', 'png', 'jpeg', 'JPG', 'PNG', 'JPEG']}

But extension comparison should be case insensitive by default and allow case sensitive checking by a boolean Prop like

acceptType={['jpg', 'png', 'jpeg']}
isCaseSensitive={true}

Let me know if this makes sense, I would love to contribute.

davidnguyen11 commented 4 years ago

it was fixed by this PR https://github.com/vutoan266/react-images-uploading/pull/64 and will be released at 3.1.0

AviKKi commented 4 years ago

I'm closing the issue since it's been solved.