React native有一个很好的lib,比如CameraRoll,它允许我们访问手机的媒体文件。但是,返回的uri缺少扩展名:
{ node:
{ timestamp: 1344461389.8,
type: 'image', <= it is used to be 'image/png' instead of 'image'
group_name: 'Camera Roll',
location:
{ altitude: 0,
longitude: -14.538611666666666,
latitude: 64.752895,
heading: 0,
speed: 0.8999988197665498 },
image:
{ width: 1668,
uri: 'ph://99D53A1F-FEEF-40E1-8BB3-7DD55A43C8B7/L0/001', <= there is no file's extension
height: 2500,
isStored: true,
playableDuration: 0 } } },
如果您知道如何获得扩展或在这种情况下的任何解决方案,请告诉我。
先感谢您!