jpuri / react-draft-wysiwyg

A Wysiwyg editor build on top of ReactJS and DraftJS. https://jpuri.github.io/react-draft-wysiwyg
MIT License
6.38k stars 1.15k forks source link

Image upload extension filter not working properly #1368

Open Joxterian opened 1 year ago

Joxterian commented 1 year ago

Hello,

I tried to use the attribute 'image.inputAccept' but seems to work weird, this is the configuration that I'm using for the images (the inputAccept is a copy from the Demo in the web page): { previewImage: true, uploadEnabled: true, uploadCallback: uploadImage, inputAccept: 'image/gif,image/jpeg,image/jpg,image/png,image/svg' } image

But the result is this: image The svg doesn't appear in the options (not even in the list of files).

If I try just put the SVG it shows me all files, and if I try to filter by SVG + something else, it only filters by the other extension: { previewImage: true, uploadEnabled: true, uploadCallback: uploadImage, inputAccept: 'image/png,image/svg' } image image

Also, the jpeg format is acting weird, adding some additional formats like jfif and pjp (I don't know if that's intentional): { previewImage: true, uploadEnabled: true, uploadCallback: uploadImage, inputAccept: 'image/jpeg' } image image

Thanks in advance