After moving from SDK 27 I’m having an issue with launchCameraAsync as it returns a “content://” uri rather than a “file://” uri as before.
I’m trying to create an asset out of this but I’m not able to find any information on how to do this, old way doesn’t work as apparently it can’t be called on “content://” uris.
Oops! We changed the behavior not to save the taken image to device gallery and it caused it, need a fix! Sorry for that. To go round this you can use FileSystem.copyAsync and make a copy of this file and the asset from the copy
I threw together a library called expo-asset-utils that can handle this use case. It uses FileSystem.copyAsync under the hood when it finds the suffix. https://github.com/expo/expo-asset-utils
const asset = await AssetUtils.resolveAsync(theUri); // Returns a Expo.Asset
or
const localUri = await AssetUtils.uriAsync(theUri); // Returns a uri with file://