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 :)
Version
Tell us which versions you are using:
Platform
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
asSelected image MIME type (image/jpeg, image/png, etc).
which better portrays the array of possible values. Withimage/heic
added as a possible type in v0.36.1 and returned asimage/jpeg
, it would make sense to include that type in response.mime's description, too :)