Page 1 of 1

Linking images in database

Posted: Sat Jun 21, 2014 2:15 am
by Tim1219988

Hi is it possible to upload a few images into the files DB, and then link to these images from one of my collections?

I was wanting to display an image with search result items in my app. I've read that you can use a pointer column type but it won't let me point to any files?

Cheers


Linking images in database

Posted: Sat Jun 21, 2014 6:47 pm
by Illya Stepanov

Hi Tim,

We'll need to clarify this point with our developers.


Linking images in database

Posted: Sun Jun 22, 2014 9:23 pm
by Yurii Orishchuk

Hi Tim.

Yes you can upload multiple files to Appery.io database.

See details how to do it here: http://devcenter.appery.io/tutorials/...

You can not link items from system Files collection to other collections.

Please use following solution for this goal:

  1. Add to your custom collection field "file" with type "string".

  2. Upload file to the system "Files" collection.

  3. Get "File Name" field and insert it in "file" field from your custom collection(that's you need to link this file).

  4. Open your custom collection mapping and link "file" field to image.asset and click "Add JS" on this mapping. Fill it with following code:

    http://prntscr.com/3ula5f/direct

    http://prntscr.com/3ulabg/direct

    pre

    return "https://appery.io/bksrv/rest/1/admin/files/download/52fd3d06e4b0a25c11c89917/" + value;

    /pre

    Regards.


Linking images in database

Posted: Mon Jun 23, 2014 5:03 am
by Tim1219988

Cool that did the trick, thanks