Background:
- SDK Version: 36
- Platforms(Android/iOS/web/all): iOS and Android
- My device: iPhone 6S Plus
Problem:
I’m trying to record a video and upload to Azure Blob Storage. This is pretty straight forward given the time I had spent to configure things and getting things right. In order to upload I need to be able to read the recorded video file as base64. I have done this in a try catch statement. I have successfully uploaded files which are ~45mb in file size. However when I read a file which is about 5 minutes in duration and file size over 50mb I get an error as follows.
Unrecognized event: [[154,154,154,154,154,154,130],[4,4,4,4,4,0,1],[[“didReceiveNetworkResponse”],[“didReceiveNetworkData”],[“didReceiveNetworkIncrementalData”],[“didReceiveNetworkDataProgress”],[“didCompleteNetworkResponse”],[3354,2000,1588331272809,false]],20999]
[[154,154,154,154,154,154,130],[4,4,4,4,4,0,1],[[“didReceiveNetworkResponse”],[“didReceiveNetworkData”],[“didReceiveNetworkIncrementalData”],[“didReceiveNetworkDataProgress”],[“didCompleteNetworkResponse”],[3354,2000,1588331272809,false]],20999]]
The code i have in place is
const fileUri = ‘file:///var/mobile/Containers/Data/Application/path-to-vide/demo_xyz.mov’;
const options = {
encoding: FileSystem.EncodingType.Base64
};
const fileBase64 = await FileSystem.readAsStringAsync(fileUri, options);
How do i solve this issue? Is there an alternate expo compatible code I can use to convert a file to base64?