react-native-image-crop-picker icon indicating copy to clipboard operation
react-native-image-crop-picker copied to clipboard

response.mime returned is dependent on options.multiple

Open Caundy opened this issue 4 years ago • 2 comments

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.36.1
  • react-native v0.63.4

Platform

  • iOS

Expected behaviour

The detection of image's MIME type should be consistent, regardless of whether the picker was opened with { multiple: true } or with { multiple: false }

Actual behaviour

MIME type (image.mime) returned for heic images is being returned as image/heic when image picker is being opened using { multiple: true }. MIME type (response.mime) returned for heic images is being returned as image/jpeg when image picker is being opened using { multiple: false }.

Sidenote

Thanks for this library :)

I think that the MIME type information could be better covered in readme, which lists (image/jpeg, image/png) as possible values of response.mime. On a first glance the list might appear to be a complete one, due to lack of ", ..." ", etc" or other indicator of other possible types. Additionally, readme could include a complete list of returned MIME types as a separate subsection.

The typings file comments mime as Selected image MIME type (image/jpeg, image/png, etc). which better portrays the array of possible values. With image/heic added as a possible type in v0.36.1 and returned as image/jpeg, it would make sense to include that type in response.mime's description, too :)

Caundy avatar Oct 04 '21 08:10 Caundy

same issue on me

qodot avatar Jan 07 '22 08:01 qodot

Same here. Is it solved? How do you deal with it guys? By hand?

wmatyjanomtek avatar Apr 13 '22 12:04 wmatyjanomtek

Single images are forced to jpg

econnerty avatar Dec 14 '22 20:12 econnerty