Page 1 of 4

Image from database not showing

Posted: Mon Sep 15, 2014 3:59 am
by Arjang Raoufinia

I have uploaded an image to the database, I query the line of database and database returns all the values correcly, even the image URL that I have in a label. However, eventhough I have mapped the image to image asset correctly, the image does not show. The URL for the broken image shows:

http://appery.io/app/view/eae6035a-46...

which is correct, for the image 955372bc-9259-464e-9faf-64895b156aed.justlogo.jpg

What am I doning wrong?


Image from database not showing

Posted: Mon Sep 15, 2014 4:01 am
by Arjang Raoufinia

From Database, I can click on the link for the image and I can download it, so I know the image is properly stored:

https://appery.io/bksrv/rest/1/admin/...


Image from database not showing

Posted: Mon Sep 15, 2014 4:36 am
by Yurii Orishchuk

Image from database not showing

Posted: Mon Sep 15, 2014 4:20 pm
by Arjang Raoufinia

Hi,
I know my links are correct on the query. I have attached two images. I am getting the vendor_name from saved local variable and show the response as mapped. When I run the app, I see the vendor query execute correctly, I can see the vendor name also, I created a label for the URL of the image map and that shows the URL, but the image still is broke. Do I need to do any type of Javascripting beyond simple mapping for the image to show?

Image Image


Image from database not showing

Posted: Mon Sep 15, 2014 11:59 pm
by Yurii Orishchuk

Hi Arjang,

I see you link "fileName" to image component asset. It's not correct. Because fileName is not a URL. See details: http://prntscr.com/4n8d4x/direct

If you have file name in your "fileName" field you should convert it to URL.

So here is solution:

1 Click "Add JS" for link to image component asset. http://prntscr.com/4n8dn0/direct

2 JS editor will appear.

3 Populate it with following code:

pre

//Note: please replace "[databaseID]" with your DB id.
var urlToSave = "https://api.appery.io/rest/1/db/files/[databaseID]/" + value;
return urlToSave;

/pre

Also if you can not manage to fix this problem please provide us your app public link and describe steps to reproduce the issue.

Regards


Image from database not showing

Posted: Tue Sep 16, 2014 12:22 am
by Arjang Raoufinia

Yurii : You are a genius!

Problem solved! Thanks,


Image from database not showing

Posted: Fri Oct 10, 2014 1:10 pm
by EJLD

Hi There,
I am querying for images from appery DB.
all images .jpg show well on browser views, and my android but not on my iOS.
it might come from the fact the original file is a artwork (vector) exported to .jpg.
see att'd. any idea how to format ?
thks in advance,
Eric

Image

Image


Image from database not showing

Posted: Sun Oct 12, 2014 8:21 am
by Illya Stepanov

Hi Eric,

I'm not sure, you're showing images from Android device and it doesn't show in iOS -- could you please provide a file example of this images?


Image from database not showing

Posted: Sun Oct 12, 2014 8:27 am
by EJLD

Hi, thks for your prompt feedback.
all .jpg or .png photographs hv no problem to show up on both OS.
however, here att'd is the file type which doesn't show up in iOS but shows up in Android. this file type was created with a vector graphic app. then exported to .jpg. any idea why it doesn t show up on iOS ?
thk you in advance
Eric

Image


Image from database not showing

Posted: Mon Oct 13, 2014 10:29 pm
by Yurii Orishchuk

Hi Eric,

It's hard to say what is wrong with this image.

So please give us your app public link and describe steps how we can test this problem in your app.

Regards.