iOS - Module not able to Download file from Camera roll path e.g ph://19816598-0009-4C6B-BE19-2939E73737E8/L0/001
Closed this issue · 4 comments
joypatel04 commented
URI = ph://19816598-0009-4C6B-BE19-2939E73737E8/L0/001
local storage URI doesn't download the image.
const getColors = async (uri) => {
try {
const colors = await ImageColors.getColors(uri, {
fallback: '#fff',
});
return Platform.OS === 'ios' ? colors.background : colors.lightMuted;
} catch (e) {
console.log(e);
}
};
Error:
Error: Could not download image.
at Object.promiseMethodWrapper [as getColors] (NativeModules.js:103)
at Object.getColors (index.js:8)
at getColors$ (index.js:40)
at tryCatch (runtime.js:63)
at Generator.invoke [as _invoke] (runtime.js:293)
at Generator.next (runtime.js:118)
at tryCatch (runtime.js:63)
at invoke (runtime.js:154)
at runtime.js:189
at tryCallTwo (core.js:45)
Please help @osamaq
osamaqarem commented
The file path looks weird. It should be file://...
. Googling tells me it's a common issue when importing an image from the camera roll.
If I'm correct, could you try:
TheWidlarzGroup/react-native-video#1572 (comment)
osamaqarem commented
Closing due to no follow up.
alexkendall commented
I have the same issue. Even converted to base64 beforehand, and get the error Error: Could not download image.
pyc92 commented
same issue