Page 1 of 1

How to map an uploaded image from the "File" database to an image asset in the app?

Posted: Wed Jul 29, 2015 5:48 pm
by Bernie

Hi,
I'm struggling to get an already uploaded image stored in the File collection of Apperyio mapped to the asset property of an image in my app.

What value of the image in the database must be attached to the asset of the image?

My update service does not come with filename and fileurl as response variables.

Image

Image


How to map an uploaded image from the "File" database to an image asset in the app?

Posted: Wed Jul 29, 2015 8:57 pm
by Pavel Zarudniy

Hi Bernie,
Please look at this doc - https://devcenter.appery.io/documenta...


How to map an uploaded image from the "File" database to an image asset in the app?

Posted: Wed Jul 29, 2015 9:35 pm
by Bernie

Thanks.
Do I have to store the uploaded image files in a custom collection before I can assign them to an asset property of an image in the GUI?


How to map an uploaded image from the "File" database to an image asset in the app?

Posted: Thu Jul 30, 2015 5:16 am
by Evgene Karachevtsev

Hello Bernie,

You can keep them in a common File colletion


How to map an uploaded image from the "File" database to an image asset in the app?

Posted: Thu Jul 30, 2015 1:25 pm
by Bernie

Ok. As a first step I am trying to get the filename and the fileurl of an uploaded file.

Therefore I upload the file with an upload service and try to fetch the filename by assigning it to a local storage variable (see screenshots below).

But when I try to read that local storage variable with alert(localStorage.getItem("varDealPicture"));
I do get a "null" as a result.

Any ideas?

Image

Image

Image