I’m getting a network error when trying to fetch a file URI from device storage
The file is an audio recording and I’m trying to upload it to a cloud storage.
I have used this example.
I’m using expo SDK version 30.
with remote debug JS mode .
I’m getting this log from chrome console:
Failed to load file:///data/user/0/host.exp.exponent/cache/ExperienceData/…/Audio/recording-eee85da3-7121-4273-86a7-686098180662.m4a: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
and this Exception in catch: TypeError: Network request failed
const asyncUpload = async ()=> {
try {
const response = await fetch(recordInfo.uri);
console.log("response", response);
const blob = await response.blob();
const blob = new Blob();
upload( blob)
}catch (e) {
console.log("error fetching",e);
}
}