From 79a936d3313c5d25dd8b61a4fe0c96ec92d88aa4 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Fri, 4 Oct 2019 10:38:57 -0300 Subject: [PATCH] [FIX] Record audio message throws exception when FileSystem.getInfoAsync is called (#1272) --- app/containers/MessageBox/Recording.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/containers/MessageBox/Recording.js b/app/containers/MessageBox/Recording.js index d5fed549a1..1b357eee20 100644 --- a/app/containers/MessageBox/Recording.js +++ b/app/containers/MessageBox/Recording.js @@ -5,7 +5,7 @@ import { } from 'react-native'; import { AudioRecorder, AudioUtils } from 'react-native-audio'; import { BorderlessButton } from 'react-native-gesture-handler'; -import FileSystem from 'expo-file-system'; +import RNFetchBlob from 'rn-fetch-blob'; import styles from './styles'; import I18n from '../../i18n'; @@ -105,7 +105,7 @@ export default class extends React.PureComponent { this.recording = false; const filePath = await AudioRecorder.stopRecording(); if (isAndroid) { - const data = await FileSystem.getInfoAsync(decodeURIComponent(filePath)); + const data = await RNFetchBlob.fs.stat(decodeURIComponent(filePath)); this.finishRecording(true, filePath, data.size); } } catch (err) {