How can I access the binary Blob data as an ArrayBuffer? I’m working with camera .jpg files. I have a special requirement for a client to load multiple photos into a zip file and post the zip to their server. I have custom code to generate the zip file that works and I’ve been able to use fetch to read the image files from local storage. How do I access the Blob data? Examples on the web show using a FileReader.readAsArayBuffer() but this doesn’t seem to be implemented. I’m using the latest expo 27
My code is:
var fileUri = ${FileSystem.documentDirectory}${filename}
;
const response = await fetch(fileUri);
const blob = await response.blob();
var reader = new FileReader();
var blob_data;
blob_data = reader.readAsBinaryString(blob); // doesn’t work
blob_data = reader.readAsArrayBuffer(blob); // doesn’t work
blob.data seems to be an object - and I don’t see how to access its raw data