+ 1

Why the image is not shown in my web page, when i set the path of the image in sololearn in my computer interface.

For example- in my phone ,when i set the image location like- /download/emulated/--- something like this ,it will work... But when i use the sololearn in computer interface and give images path according to its property in my computer as /c:/desktop/--- something like that. . it never displays the image in sololearn computer interface codeplayground.. why this happens? But the same code runs perfectly in my browser. But not in codeplayground.

21st Jul 2018, 1:35 PM
Sayak Ghosh
Sayak Ghosh - avatar
8 Antworten
+ 5
Because in PC you run playground in a browser and every content needs http or https protocol. In the app it uses web view so you have access to your local files.
21st Jul 2018, 2:14 PM
Toni Isotalo
Toni Isotalo - avatar
+ 3
You can't access local storage. You have to upload it online somewhere.
21st Jul 2018, 1:36 PM
Paul Grasser
Paul Grasser - avatar
+ 2
Sayak Ghosh That's strange.... Idk just use free image hosting.
21st Jul 2018, 1:50 PM
Paul Grasser
Paul Grasser - avatar
+ 1
but when i download any image on my phone and use the image location , it runs perfectly ? :(
21st Jul 2018, 1:42 PM
Sayak Ghosh
Sayak Ghosh - avatar
+ 1
Sayak Ghosh Really???
21st Jul 2018, 1:45 PM
Paul Grasser
Paul Grasser - avatar
+ 1
img src="file:///storage/emulated/0/Download/love_colorful.jpg" height=150 width=345 /> above is the local path of image in my phone and it runs in codeplayground in phone app :/
21st Jul 2018, 1:47 PM
Sayak Ghosh
Sayak Ghosh - avatar
+ 1
yes..really strange.. same thing perfect runs in phone app's codeplayground but not in sololearn's web codeplayground :/
21st Jul 2018, 1:55 PM
Sayak Ghosh
Sayak Ghosh - avatar
+ 1
thanks Toni.. understood :)
21st Jul 2018, 2:19 PM
Sayak Ghosh
Sayak Ghosh - avatar