React native 将文件保存到expo文件系统时出现问题。我获取了录制的uri,但可以';离开屏幕后,我似乎没有收到文件
所以我的问题是标题说了什么,我已经被这个问题困扰了一个多星期了,我对我能做什么感到茫然。这是密码 我尝试过许多不同的方法,但似乎都不起作用,至少在保存文件时是这样。如果您需要查看更多代码,请告诉我React native 将文件保存到expo文件系统时出现问题。我获取了录制的uri,但可以';离开屏幕后,我似乎没有收到文件,react-native,expo,React Native,Expo,所以我的问题是标题说了什么,我已经被这个问题困扰了一个多星期了,我对我能做什么感到茫然。这是密码 我尝试过许多不同的方法,但似乎都不起作用,至少在保存文件时是这样。如果您需要查看更多代码,请告诉我 async _stopRecordingAndEnablePlayback() { this.setState({ isLoadingz: true }); try { await this.recording.stopAndUnloadAsync();
async _stopRecordingAndEnablePlayback() {
this.setState({
isLoadingz: true
});
try {
await this.recording.stopAndUnloadAsync();
} catch (error) {
}
const info = await FileSystem.getInfoAsync(this.recording.getURI());
console.log(
`FILE INFO: ${JSON.stringify(info)}`,
info.uri
);
const arr = [];
const xFileInfo = JSON.stringify(info);
arr.push(xFileInfo);
this.setState({ fileInfo: arr, fileUri: info.uri });
console.log(arr);