fresco
fresco copied to clipboard
Cant load a local image, the file's name has percent-encoding string
Fresco 0.6.0 Android 5.1
file namehttps%3A%2F%2F41.media.tumblr.com%2Ff78cac2b19b09e8923c26b8f0c78b7fa%2Ftumblr_n705ejCvHO1rq3e41o1_1280.jpg
logE/JHEAD﹕ can't open '/storage/emulated/0/Tumblr/https:/41.media.tumblr.com/f78cac2b19b09e8923c26b8f0c78b7fa/tumblr_n705ejCvHO1rq3e41o1_1280.jpg'
It works when I change the file name to a normal string. Help
I create a new ImageRequest and override the getSouceFile() function to resolve the encode problem.
@Override
public synchronized File getSourceFile() {
File file = super.getSourceFile();
if (file == null || !file.exists()) {
file = new File(getSourceUri().getEncodedPath());
}
return file;
}