I'm developing an application that runs both web and mobile app (React Native). In the mobile app, I have to fetch a file from S3 Bucket and convert it to base64 in order to show and write it to mobile storage.
When fetching a file that has a small size, I just fetch a file from S3 without responseType.
But when I fetch a large file, I don't get any data from API and the mobile app is stunned (it keeps loading and I cannot get any response from API). So I have to pass responseType: 'blob' to get data from API.
My question is: How to convert or read Blob to base64 while React Native cannot use FileReader like a web application?
Thanks in advance!