react-images-uploading icon indicating copy to clipboard operation
react-images-uploading copied to clipboard

Accepted Type Svg

Open mehmetakify opened this issue 2 years ago • 3 comments

Although svg is not an element of accepted types array, those files can be selected.

mehmetakify avatar Feb 08 '22 23:02 mehmetakify

Hi @mehmetakify, sorry for the too late reply. Not sure the scenario in you faced the issue, because I am not able to reproduce the bug. Can you add some more code blocks..?

vutoan266 avatar Jul 09 '22 03:07 vutoan266

Happened to me too. when defining "acceptType = ['png']" for some reason if I upload svg file, I don't get an error

ChenDimri avatar Jul 20 '22 13:07 ChenDimri

Hi @vutoan266 it is simple code block like @ChenDimri said:

const ACCEPTED_IMAGE_TYPES = ["jpg", "png", "webp", "gif", "jfif", "bmp"] <ImageUploading multiple value={images} onChange={onChange} maxNumber={maxNumber} acceptType={ACCEPTED_IMAGE_TYPES}

I can select svg files with this code

mehmetakify avatar Jul 28 '22 22:07 mehmetakify