[我正在尝试读取以ph://
开头的图像文件,并使用RNFS将它们转换为base64字符串,但是很不幸,我收到了ENOENT: no such file or directory
错误。
如何读取这些文件并将其转换为base64?
您可以使用react-native-convert-ph-asset
import RNConvertPhAsset from 'react-native-convert-ph-asset';
const convertLocalIdentifierToAssetLibrary = async (localIdentifier) => {
return await RNHeicConverter.convert({
// options
path: localIdentifier,
});
};