Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid URL #93

Open
macasfaj opened this issue Aug 13, 2020 · 2 comments
Open

Invalid URL #93

macasfaj opened this issue Aug 13, 2020 · 2 comments

Comments

@macasfaj
Copy link

Hi there! I'm testing this imagelink:

https://upload.wikimedia.org/wikipedia/commons/e/e8/Barry_Edward_O%27Meara,_holding_a_copy_of_his_book,_A_Voice_From_St._Helena_%281822%29.jpg

And it doesn't work... :/

I'm using iOS 2.0.2 module and Ti SDK 9.0.3.GA

But it works 100% if I use standard ImageView.

Any idea? Thanks!

@m1ga
Copy link
Contributor

m1ga commented Aug 15, 2020

It's the URL encoding. Use https://upload.wikimedia.org/wikipedia/commons/e/e8/Barry_Edward_O'Meara,_holding_a_copy_of_his_book,_A_Voice_From_St._Helena_(1822).jpg and it works

@gjerlow
Copy link

gjerlow commented Nov 2, 2020

The current URL encoding using stringByAddingPercentEscapesUsingEncoding does have a negative impact on certain image urls that e.g. include %2F as encoding of /.

A valid sample of this is when using "subfolders" in Firebase, since Firebase doesn't actually use folders but instead add a reference in the url using subfolder%2FimageName. The URL encoding in the modules results in %2F being encoded to %252F which will result in a bad url (404).

As a quick fix I just removedstringByAddingPercentEscapesUsingEncoding from the code, but as a long term fix it would be great to add a property for optional encoding (e.g. urlEncode: true/false).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants