Using the new Camera component, what’s the right way to read the image that gets saved in the cache folder? The goal is to upload it to a firebase storage bucket and that requires a Blob, Uint8Array, or ArrayBuffer. FileSystem.readAsStringAsync fails for me with
[Error: File 'file:///var/mobile/.....49B2413.jpg' could not be read.]
Sorry I am new to expo so I am sure I am doing something wrong. But I struggle with this as well with reading a video after calling stopRecording(). I can’t get fetch or expo-file-system seem to work. Do you have an example how to use it?
Here is what I am trying to do:
import { readAsStringAsync, EncodingType } from "expo-file-system";
// fsUri passed in by recordAsync() promise
const file = await readAsStringAsync(fsUri, {
encoding: EncodingType.UTF8,
});
console.log(`File read. ${file.length} long`);
This results in an empty string, using base64 encoding crashes on Android without Error and displays the initially mentioned error in iOS.