Page 1 of 1

Image cannot load

Posted: Tue Aug 05, 2014 5:15 pm
by Erjan

Hi Support

I have followed your tutorial on loading the image from dbase.
Appery("workShop_Logo").attr('src', Appery.getImagePath('audi_logo.png'));

But when I test it out, No image at all. The html page was showing...
Image


Image cannot load

Posted: Tue Aug 05, 2014 5:34 pm
by Evgene Karachevtsev

Hello Erjan,

This code displays the image not from the database, but from one of those images that have been uploaded via the Media Manager.
If you want to display the image from the database, you must provide a link to it in this form, as it is shown here:
http://devcenter.appery.io/documentat...
And, for example, save it in a url variable, then your code will look like:
preAppery("workShop_Logo").attr('src', url);/pre


Image cannot load

Posted: Wed Aug 06, 2014 10:02 am
by Erjan

Sorry mistypo, what I mean is want to load image from media manager.
I have tried to clear the cache but no success.


Image cannot load

Posted: Wed Aug 06, 2014 4:10 pm
by Evgene Karachevtsev

Erjan,

Could you please check, do you have the image audi_logo.png in Media Manager? Could you please provide is the public a link to your application?


Image cannot load

Posted: Thu Aug 07, 2014 12:18 am
by Erjan

Yes i have the image, the link is appery.io/app/view/7c91c074-1e1f-40d8-8d50-f2031a2de485/startPage.html


Image cannot load

Posted: Thu Aug 07, 2014 4:31 am
by obullei

Hello!

Please provide us your login and password and steps to reproduce.


Image cannot load

Posted: Thu Aug 07, 2014 5:45 am
by Erjan

Just send the detail to your support email


Image cannot load

Posted: Thu Aug 07, 2014 10:39 pm
by Yurii Orishchuk

Hi Erjan,

I've checked your app and see following error:

you have code:

pre

Appery("workShop_Logo").attr("src", Appery.getImagePath(localStorage.getItem('var_workshopLogo')));

/pre

in this code you get imageName from "var_workshopLogo" LSV thus you should have in this LSV correct value. But currently there is "null". Did you forget set it?

see details on screen shot:

http://prntscr.com/4am1hu/direct

Regards.


Image cannot load

Posted: Sat Aug 09, 2014 4:46 pm
by Erjan

Hi Yurii,

I have commented the above mentioned line. So now i will put the actual filename, still cannot load the image.

Thanks


Image cannot load

Posted: Mon Aug 11, 2014 3:24 am
by Yurii Orishchuk

Hi Erjan,

Still see that you try to get correct image name from LSV "var_workshopLogo". But there is still "null".

Please use following code near your code to see in browser console what are you have in your LSV "var_workshopLogo".

pre

//Code to log in browser console.
console.log("var_workshopLogo = " + localStorage.getItem('var_workshopLogo'));

//Your code.
Appery("workShop_Logo").attr("src", Appery.getImagePath(localStorage.getItem('var_workshopLogo')));

/pre

After this code you will need open browser console and you will see here what you have in this LSV.

Regards.