question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Load the local image with url which is contain special symbol

See original GitHub issue

the local url is : /storage/emulated/0/tencent/QQfile_recv/KB1U3X]UODZSR[1H1)G%W.png but it load fail,and throw the throwable on BaseControllerListener.onFailure: java.io.FileNotFoundException: /storage/emulated/0/tencent/QQfile_recv/KB1U3X]UODZSR[1H1)G�png: open failed: ENOENT (No such file or directory)

I think,it cause the url contain special symbol %

I promise the local image is exist

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
thizisaruncommented, Mar 29, 2016

How you load your local file ? its like simpleDraweeView.setImageUri(Uri.parseFromFile(new File(path))) right ?

0reactions
Ujjwal-softcommented, Nov 24, 2017

Found a solutions to this:

convert imagepath to Uri as : Uri picUri= Uri.fromFile(new File("/storage/emulated/0/Pictures/OGQ/Richard Walker_Stairway To Heaven%3F_YkFgR2RZ.jpg"

ImageRequest request=ImageRequestBuilder.newBuilderWithSource(picUri).setResizeOptions(new ResizeOptions(width, height)).build();

This will load image contains special chars or symbols.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to load a local image to WebGL context - Stack Overflow
You would pass the URL and a unique name for the image into the map. ... Once loaded, you can then set the...
Read more >
Unable to display images with special characters in URL ... - IBM
If url doesn't have any special characters, the escaped string will be same as original string and hence image will be loaded as...
Read more >
Using URL encoding to handle special characters in a ...
Conclusion. While it is possible to load documents into MarkLogic Server, where the document URI contains special characters not encoded, it is ...
Read more >
url() - CSS: Cascading Style Sheets - MDN Web Docs
The url() CSS function is used to include a file. The parameter is an absolute URL, a relative URL, a blob URL, or...
Read more >
How to set src to the img tag in html from the system drive?
To use an image on a webpage, use the <img> tag. The tag allows you to add image source, alt, width, height, etc....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found