Hi, @Elyx0 , first at all, great module for RN, your work is amazing.
I've been using your module, quite good, but I face an issue with it.
when trying load files from iCloud or Dropbox, the module it can't able to find it, also I've tried with
but not luck, it throw theses errors.
I've been trying all these codes
loadFile(url) {
console.log("START LOADING FILES");
setTimeout(() => {
console.log("LOADING FILES");
const parts = url.split("/");
const _parts = url.split("/");
const name = parts.pop();
const inbox = parts.pop();
const mainPath = `${RNFS.MainBundlePath}/${inbox}/${name}`;
const cachaPath = `${RNFS.CachesDirectoryPath}/${inbox}/${name}`;
const documentPath = `${RNFS.DocumentDirectoryPath}/${inbox}/${name}`;
const tmpPath = `${RNFS.TemporaryDirectoryPath}/${inbox}/${name}`;
_parts.shift();
_parts.shift();
_parts.shift();
_parts.shift();
const _url = _parts.join("/");
// URL
RNFetchBlob.fs.stat(`/${_url}`)
.then((file) => {
console.log("_url SUCCESS", file);
file.path = url;
//uploadFile(file);
})
.catch((err) => {
console.log("_url => ERROR", err)
});
RNFS.stat(`/${_url}`)
.then((file) => {
console.log("RNFS _url SUCCESS", file);
})
.catch((err) => {
console.log("RNFS _url ERROR", err);
});
RNFS.stat(url)
.then((file) => {
console.log("RNFS URL SUCCESS", file);
})
.catch((err) => {
console.log("RNFS URL ERROR", err);
});
RNFS.stat(mainPath)
.then((file) => {
console.log("RNFS mainPath SUCCESS", file);
})
.catch((err) => {
console.log("RNFS mainPath ERROR", err);
});
RNFS.stat(cachaPath)
.then((file) => {
console.log("RNFS cachaPath SUCCESS", file);
})
.catch((err) => {
console.log("RNFS cachaPath ERROR", err);
});
RNFS.stat(documentPath)
.then((file) => {
console.log("RNFS documentPath SUCCESS", file);
})
.catch((err) => {
console.log("RNFS documentPath ERROR", err);
});
RNFS.stat(tmpPath)
.then((file) => {
console.log("RNFS tmpPath SUCCESS", file);
})
.catch((err) => {
console.log("RNFS tmpPath ERROR", err);
});
// URL
RNFetchBlob.fs.stat(url)
.then((file) => {
console.log("URL SUCCESS", file);
file.path = url;
//uploadFile(file);
})
.catch((err) => {
console.log("URL => ERROR", err)
});
// MAIN
RNFetchBlob.fs.stat(mainPath)
.then((file) => {
console.log("mainPath SUCCESS", file);
file.path = url;
//uploadFile(file);
})
.catch((err) => {
console.log("mainPath => ERROR", err)
});
// CACHE
RNFetchBlob.fs.stat(cachaPath)
.then((file) => {
console.log("cachaPath SUCCESS", file);
file.path = url;
//uploadFile(file);
})
.catch((err) => {
console.log("cachaPath => ERROR", err)
});
// DOCUMENT
RNFetchBlob.fs.stat(documentPath)
.then((file) => {
console.log("documentPath SUCCESS", file);
file.path = url;
//uploadFile(file);
})
.catch((err) => {
console.log("documentPath => ERROR", err)
});
// TEMP
RNFetchBlob.fs.stat(tmpPath)
.then((file) => {
console.log("tmpPath SUCCESS", tmpPath);
file.path = url;
//uploadFile(file);
})
.catch((err) => {
console.log("tmpPath => ERROR", err)
});
}, 5000);
}
please, point me in the right direction to make this work.
Thanks.