react-native-img-cache
react-native-img-cache copied to clipboard
RNFetchBlob does not respect the http status
Hi there,
i cloned your project down and im trying to modify one file so that i can publish a local copy. Sorry im not really good at this yet, but i would like to make some change to your file to handle the http status code due to the issue of RNFetchBlob does not cater for.
I do not believe i have the right setup to compile the code, but would love to share my idea anyway
I made change to the file new code to basically bubble up the event to the image container (custom image) (sorry i hardcode to status 401 for now)
I'll do some research over the weekend on how to do this, but now i just need to get things working. Would love to help
I also have troubles with error code from RNFetchBlob. For example if my server returns 403 I get the error:
onError e.nativeEvent.error: Error decoding image data <NSData 0x00000000001; 15 bytes>
or if there is no image by a remote URL I get:
onError e.nativeEvent.error: Error decoding image data <NSData 0x00000000001; 62 bytes>
This is very poor error descriptions and this behaviour must to be fixed.
Hi @samw2k00, i tried this library and it was working fine in android, upon inspecting why it did not work in iOsS, i realised i had disabled the Transport security exception. Please check if you have enabled the Allow Arbitrary / added the url to the exception domains, for the urls that you are trying to load via RNFetch blob. Thanks